utkarsharma2 commented on code in PR #44238:
URL: https://github.com/apache/airflow/pull/44238#discussion_r1851927314
##########
tests/api_fastapi/core_api/routes/public/test_task_instances.py:
##########
@@ -1671,3 +1683,354 @@ def test_raises_404_for_nonexistent_task_instance(self,
test_client, session):
assert response.json() == {
"detail": "The Task Instance with dag_id:
`example_python_operator`, run_id: `TEST_DAG_RUN_ID`, task_id:
`nonexistent_task`, try_number: `0` and map_index: `-1` was not found"
}
+
+
+class TestTaskInstancesLog:
+ DAG_ID = "dag_for_testing_log_endpoint"
+ RUN_ID = "dag_run_id_for_testing_log_endpoint"
+ TASK_ID = "task_for_testing_log_endpoint"
+ MAPPED_TASK_ID = "mapped_task_for_testing_log_endpoint"
+ TRY_NUMBER = 1
+
+ default_time = "2020-06-10T20:00:00+00:00"
+
+ @pytest.fixture(autouse=True)
+ def setup_attrs(self, configure_loggers, dag_maker, session) -> None:
+ self.app = create_app()
+ self.client = TestClient(self.app)
Review Comment:
User the fixtures in the test cases. PTAL.
--
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]