From f8e9b090cdd91e868ee2b5c8de02dd5f34a60350 Mon Sep 17 00:00:00 2001 From: Omkar P <45419097+omkar-foss@users.noreply.github.com> Date: Fri, 8 Nov 2024 21:26:20 +0530 Subject: [PATCH] Use hardcoded timestamp in dags test as well --- tests/api_fastapi/core_api/routes/public/test_dags.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/api_fastapi/core_api/routes/public/test_dags.py b/tests/api_fastapi/core_api/routes/public/test_dags.py index f913fd36e4bbb..e200763c2a723 100644 --- a/tests/api_fastapi/core_api/routes/public/test_dags.py +++ b/tests/api_fastapi/core_api/routes/public/test_dags.py @@ -274,8 +274,8 @@ class TestDagDetails(TestDagEndpoint): @pytest.mark.parametrize( "query_params, dag_id, expected_status_code, dag_display_name, start_date", [ - ({}, "fake_dag_id", 404, "fake_dag", datetime(2023, 12, 31, tzinfo=timezone.utc)), - ({}, DAG2_ID, 200, DAG2_ID, DAG2_START_DATE), + ({}, "fake_dag_id", 404, "fake_dag", "2023-12-31T00:00:00Z"), + ({}, DAG2_ID, 200, DAG2_ID, "2021-06-15T00:00:00Z"), ], ) def test_dag_details( @@ -330,7 +330,7 @@ def test_dag_details( }, "render_template_as_native_obj": False, "timetable_summary": None, - "start_date": start_date.replace(tzinfo=None).isoformat() + "Z", # pydantic datetime format + "start_date": start_date, "tags": [], "template_search_path": None, "timetable_description": "Never, external triggers only",