You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ephraimbuddy (via GitHub)" <gi...@apache.org> on 2023/04/11 15:29:14 UTC

[GitHub] [airflow] ephraimbuddy commented on a diff in pull request #30346: Fix POST /taskInstances/list with wildcards returns unhelpful error

ephraimbuddy commented on code in PR #30346:
URL: https://github.com/apache/airflow/pull/30346#discussion_r1162994125


##########
tests/api_connexion/endpoints/test_task_instance_endpoint.py:
##########
@@ -874,6 +874,15 @@ def test_should_raise_403_forbidden(self):
         )
         assert response.status_code == 403
 
+    def test_should_raise_400_for_no_json(self):
+        expected = "POST Body must not be empty"
+        response = self.client.post(
+            "/api/v1/dags/~/dagRuns/~/taskInstances/list",
+            environ_overrides={"REMOTE_USER": "test"},
+        )
+        assert response.status_code == 400
+        assert expected in response.json["detail"]

Review Comment:
   ```suggestion
           assert expected == response.json["detail"]
   ```



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org