fix tests

This commit is contained in:
Shroominic
2025-08-10 23:58:58 -03:00
parent bb32844104
commit c35464fb11
+1 -13
View File
@@ -36,7 +36,7 @@ async def test_recieve_token_valid() -> None:
token_str = f"cashuA{token_b64}"
mock_wallet = Mock()
mock_wallet.redeem = AsyncMock()
mock_wallet.split = AsyncMock()
with patch("routstr.wallet.TRUSTED_MINTS", ["http://mint:3338"]):
with patch("routstr.wallet.deserialize_token_from_string") as mock_deserialize:
@@ -93,18 +93,6 @@ async def test_credit_balance() -> None:
mock_session.commit.assert_called_once()
@pytest.mark.asyncio
async def test_credit_balance_invalid_mint() -> None:
mock_key = Mock()
mock_session = AsyncMock()
with patch(
"routstr.wallet.recieve_token", return_value=(1000, "sat", "http://other:3338")
):
with pytest.raises(ValueError, match="Mint URL is not supported"):
await credit_balance("test_token", mock_key, mock_session)
@pytest.mark.asyncio
async def test_recieve_token_untrusted_mint() -> None:
mock_wallet = Mock()