kaxil commented on code in PR #59711:
URL: https://github.com/apache/airflow/pull/59711#discussion_r2644489254
##########
airflow-core/tests/unit/api_fastapi/execution_api/versions/head/test_task_instances.py:
##########
@@ -1121,20 +1125,19 @@ def test_ti_update_state_to_deferred(self, client,
session, create_task_instance
instant = timezone.datetime(2024, 11, 22)
time_machine.move_to(instant, tick=False)
+ from airflow.sdk.serde import serialize
+
payload = {
"state": "deferred",
- # Raw payload is already "encoded", but not encrypted
- "trigger_kwargs": {
- "__type": "dict",
- "__var": {"key": "value", "moment": {"__type": "datetime",
"__var": 1734480001.0}},
- },
+ "trigger_kwargs": serialize(
+ {"key": "value", "moment": datetime(2024, 12, 18, 0, 0, 1,
tzinfo=timezone.utc)}
+ ),
Review Comment:
let's put the raw value -- i.e. output of `serialize(
{"key": "value", "moment": datetime(2024, 12, 18, 0, 0, 1,
tzinfo=timezone.utc)}`
--
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]