Skip to content

Commit

Permalink
Fix TestGetEventLog logical_date datetime format
Browse files Browse the repository at this point in the history
  • Loading branch information
jason810496 committed Nov 21, 2024
1 parent fc0b1e0 commit ba9f034
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/api_fastapi/core_api/routes/public/test_event_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from airflow.utils.session import provide_session

from tests_common.test_utils.db import clear_db_logs, clear_db_runs
from tests_common.test_utils.format_datetime import datetime_zulu_format
from tests_common.test_utils.format_datetime import datetime_zulu_format, datetime_zulu_format_without_ms

pytestmark = pytest.mark.db_test

Expand Down Expand Up @@ -168,7 +168,9 @@ def test_get_event_log(self, test_client, setup, event_log_key, expected_status_
"map_index": event_log.map_index,
"try_number": event_log.try_number,
"event": expected_body.get("event"),
"logical_date": datetime_zulu_format(event_log.logical_date) if event_log.logical_date else None,
"logical_date": datetime_zulu_format_without_ms(event_log.logical_date)
if event_log.logical_date
else None,
"owner": expected_body.get("owner"),
"extra": expected_body.get("extra"),
}
Expand Down

0 comments on commit ba9f034

Please sign in to comment.