amoghrajesh commented on code in PR #44108:
URL: https://github.com/apache/airflow/pull/44108#discussion_r1850256069


##########
tests/api_fastapi/core_api/routes/public/test_dag_run.py:
##########
@@ -56,6 +56,11 @@
 END_DATE = datetime(2024, 6, 15, 0, 0, tzinfo=timezone.utc)
 EXECUTION_DATE = datetime(2024, 6, 16, 0, 0, tzinfo=timezone.utc)
 DAG1_RUN1_NOTE = "test_note"
+ZULU_STR_FORMAT = '%Y-%m-%dT%H:%M:%S%z'
+
+
+def format_datetime_zulu(dt):
+    return dt.strftime(ZULU_STR_FORMAT).replace('+0000', 'Z')
 

Review Comment:
   This is not the only file we need to edit. Can you probably place this 
utility somewhere under `airflow/tests_common/test_utils` and reuse it across 
other files?
   
   For instance, also check for `test_assets.py`



##########
tests/api_fastapi/core_api/routes/public/test_dag_run.py:
##########
@@ -56,6 +56,11 @@
 END_DATE = datetime(2024, 6, 15, 0, 0, tzinfo=timezone.utc)
 EXECUTION_DATE = datetime(2024, 6, 16, 0, 0, tzinfo=timezone.utc)
 DAG1_RUN1_NOTE = "test_note"
+ZULU_STR_FORMAT = '%Y-%m-%dT%H:%M:%S%z'
+
+
+def format_datetime_zulu(dt):

Review Comment:
   ```suggestion
   def format_datetime_zulu(dt: datetime) -> str:
   ```



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