feat: finish register receiving and authority routing
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a023c0-a0a3-7c03-b395-5a0d2757214d
This commit is contained in:
parent
6d134425df
commit
d103955217
28 changed files with 970 additions and 48 deletions
17
tests/test_time.py
Normal file
17
tests/test_time.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
from datetime import UTC, datetime, timedelta, timezone
|
||||
|
||||
import pytest
|
||||
|
||||
from repo_manager.time import format_utc
|
||||
|
||||
|
||||
def test_format_utc_normalizes_offsets_and_uses_z() -> None:
|
||||
local = datetime(2026, 8, 21, 22, 30, tzinfo=timezone(timedelta(hours=2)))
|
||||
|
||||
assert format_utc(local) == "2026-08-21T20:30:00Z"
|
||||
assert format_utc(local.astimezone(UTC)).endswith("Z")
|
||||
|
||||
|
||||
def test_format_utc_rejects_naive_datetime() -> None:
|
||||
with pytest.raises(ValueError, match="timezone-aware"):
|
||||
format_utc(datetime(2026, 8, 21, 20, 30)) # noqa: DTZ001 - deliberate invalid input
|
||||
Loading…
Add table
Add a link
Reference in a new issue