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:
redshift
2026-09-08 17:00:15 +02:00
parent 623c55227c
commit 7b2918ad6e
+1
View File
@@ -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