mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user