mirror of
https://github.com/Routstr/routstr-core.git
synced 2026-10-05 12:28:22 +00:00
fix(types): narrow await_args for mypy in x-cashu key-config test
uv run mypy . failed with union-attr on store_mock.await_args.kwargs (AsyncMock.await_args is typed _Call | None, and assert_awaited_once() does not narrow it). Add an explicit None check before accessing kwargs.
This commit is contained in:
@@ -1028,6 +1028,7 @@ async def test_x_cashu_key_config_422_refunds_and_sets_x_cashu_header() -> None:
|
||||
)
|
||||
# The redemption itself was recorded.
|
||||
store_mock.assert_awaited_once()
|
||||
assert store_mock.await_args is not None
|
||||
assert store_mock.await_args.kwargs.get("typ") == "in"
|
||||
# Passthrough shape with the refund attached.
|
||||
assert response.status_code == 422
|
||||
|
||||
Reference in New Issue
Block a user