rawwar commented on code in PR #44301:
URL: https://github.com/apache/airflow/pull/44301#discussion_r1855200377


##########
tests/api_fastapi/core_api/routes/public/test_task_instances.py:
##########
@@ -2318,3 +2318,44 @@ def test_raises_404_for_non_existent_dag(self, 
test_client):
         )
         assert response.status_code == 404
         assert "DAG non-existent-dag not found" in response.text
+
+
+class TestGetTaskInstanceTries(TestTaskInstanceEndpoint):
+    def test_should_respond_200(self, test_client, session):
+        self.create_task_instances(
+            session=session, task_instances=[{"state": State.SUCCESS}], 
with_ti_history=True
+        )
+        print("here")
+        response = test_client.get(
+            
"/public/dags/example_python_operator/dagRuns/TEST_DAG_RUN_ID/taskInstances/print_the_context/tries"
+        )
+        assert response.status_code == 200
+        assert response.json()["total_entries"] == 2  # The task instance and 
its history
+        assert len(response.json()["task_instances"]) == 2

Review Comment:
   can we also check the task_instance details?



-- 
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]

Reply via email to