chore: fix lint

This commit is contained in:
Vlad Stan
2026-03-30 13:12:46 +03:00
parent 22b4ab779f
commit c94cef07c2
16 changed files with 139 additions and 78 deletions
+6 -2
View File
@@ -18,7 +18,9 @@ from lnbits.utils.exchange_rates import (
class MockResponse:
def __init__(self, *, text: str = "", json_data=None, error: Exception | None = None):
def __init__(
self, *, text: str = "", json_data=None, error: Exception | None = None
):
self.text = text
self._json_data = json_data or {}
self._error = error
@@ -263,7 +265,9 @@ async def test_btc_rates_skips_unsupported_and_failing_providers(
)
client = MockAsyncClient(MockResponse(error=httpx.HTTPError("boom")))
mocker.patch.object(settings, "lnbits_allowed_currencies", [])
mocker.patch.object(settings, "lnbits_exchange_rate_providers", [unsupported, failing])
mocker.patch.object(
settings, "lnbits_exchange_rate_providers", [unsupported, failing]
)
mocker.patch("lnbits.utils.exchange_rates.httpx.AsyncClient", return_value=client)
assert await btc_rates("usd") == []