mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
fix(tests): satisfy mypy on the queue-item push tests
The #568 tests unpacked AsyncMock.await_args without narrowing its Optional type and passed a SimpleNamespace where _format_task_detail is annotated TaskTable. Narrow with the repo-standard 'assert await_args is not None' and cast the fake task at the call sites.
This commit is contained in:
@@ -238,6 +238,7 @@ async def test_proposes_sends_telegram_push(
|
||||
task = await engine.run_cycle()
|
||||
assert task is not None
|
||||
notify.assert_awaited_once()
|
||||
assert notify.await_args is not None
|
||||
_args, kwargs = notify.await_args
|
||||
assert kwargs["kind"] == "release"
|
||||
assert kwargs["id8"] == str(task.id)[:8]
|
||||
|
||||
Reference in New Issue
Block a user