EugeneTorap commented on code in PR #22355:
URL: https://github.com/apache/superset/pull/22355#discussion_r1042707576


##########
tests/integration_tests/datasource_tests.py:
##########
@@ -466,9 +466,9 @@ def test_get_samples(test_client, login_as_admin, 
virtual_dataset):
         
f"/datasource/samples?datasource_id={virtual_dataset.id}&datasource_type=table"
     )
     # feeds data
-    test_client.post(uri)
+    test_client.post(uri, json={})
     # get from cache
-    rv = test_client.post(uri)
+    rv = test_client.post(uri, json={})

Review Comment:
   > Request.get_json() will raise a 400 BadRequest error if the Content-Type 
header is not application/json. This makes a very common source of confusion 
more visible. https://github.com/pallets/werkzeug/issues/2339
   
   If there's no json param or `json=None` then 400 http status will be thrown



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to