Pin the UTC offset on the time a flow version carries
Every datetime the API emits for versions (flow summaries' updated_at, runs' created/started/finished with flow_version) is already ISO 8601 with Z or +00:00. A test holds it and the API docs say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WgBfkm4rCmtd1T4vHWjEPx
This commit is contained in:
@@ -62,6 +62,11 @@ def test_save_then_read_flow(
|
||||
assert body["definition"]["title"] == "Demo"
|
||||
assert {node["id"] for node in body["definition"]["nodes"]} == {"sensor", "logger"}
|
||||
|
||||
# The time beside a version carries its offset, so no client guesses a zone.
|
||||
listed = client.get(f"{PREFIX}/", headers=superuser_token_headers).json()["data"]
|
||||
summary = next(flow for flow in listed if flow["name"] == "demo")
|
||||
assert datetime.fromisoformat(summary["updated_at"]).tzinfo is not None
|
||||
|
||||
|
||||
def test_name_mismatch_is_rejected(
|
||||
client: TestClient, superuser_token_headers: dict[str, str]
|
||||
|
||||
Reference in New Issue
Block a user