From 20d38535aac56feddf46f95b5b35794a94cbb298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Mon, 3 Oct 2022 16:46:56 +0200 Subject: [PATCH] fix tests settings --- tests/conftest.py | 4 ++-- tests/extensions/bleskomat/test_lnurl_api.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 1e719c76a..46282f0c2 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -10,7 +10,7 @@ from lnbits.core.crud import create_account, create_wallet, get_wallet from lnbits.core.models import BalanceCheck, Payment, User, Wallet from lnbits.core.views.api import CreateInvoiceData, api_payments_create_invoice from lnbits.db import Database -from lnbits.settings import HOST, PORT +from lnbits.settings import settings from tests.helpers import credit_wallet, get_random_invoice_data @@ -38,7 +38,7 @@ def app(event_loop): @pytest_asyncio.fixture(scope="session") async def client(app): - client = AsyncClient(app=app, base_url=f"http://{HOST}:{PORT}") + client = AsyncClient(app=app, base_url=f"http://{settings.host}:{settings.port}") yield client await client.aclose() diff --git a/tests/extensions/bleskomat/test_lnurl_api.py b/tests/extensions/bleskomat/test_lnurl_api.py index 3f7232669..53a85bd62 100644 --- a/tests/extensions/bleskomat/test_lnurl_api.py +++ b/tests/extensions/bleskomat/test_lnurl_api.py @@ -9,7 +9,7 @@ from lnbits.extensions.bleskomat.helpers import ( generate_bleskomat_lnurl_signature, query_to_signing_payload, ) -from lnbits.settings import HOST, PORT +from lnbits.settings import settings from tests.conftest import client from tests.extensions.bleskomat.conftest import bleskomat, lnurl from tests.helpers import credit_wallet, is_regtest @@ -90,7 +90,7 @@ async def test_bleskomat_lnurl_api_valid_signature(client, bleskomat): assert data["minWithdrawable"] == 1000 assert data["maxWithdrawable"] == 1000 assert data["defaultDescription"] == "test valid sig" - assert data["callback"] == f"http://{HOST}:{PORT}/bleskomat/u" + assert data["callback"] == f"http://{settings.host}:{settings.port}/bleskomat/u" k1 = data["k1"] lnurl = await get_bleskomat_lnurl(secret=k1) assert lnurl