test(audit): guard await_args against None for mypy union-attr

CI mypy (which checks tests/, unlike the targeted source-only run that
missed it) flagged ack_mock.await_args.args[1] — await_args is
_Call | None. Assert it is not None first, matching the spawn_call
pattern above.
This commit is contained in:
Renn F
2026-07-14 06:14:27 +02:00
committed by Renzo F
parent 6fe0067f73
commit 1c63c88cbf
@@ -191,7 +191,9 @@ async def test_reactive_alert_acks_so_it_cannot_rotate(
assert spawn_mock.await_count == 1 # not respawned on tick 2
assert ack_mock.await_count == 1
# acked as the auditor saw it: (client, alert_id)
assert ack_mock.await_args.args[1] == alert_id
ack_call = ack_mock.await_args
assert ack_call is not None
assert ack_call.args[1] == alert_id
@pytest.mark.anyio