fix tests settings
This commit is contained in:
parent
f9de542361
commit
2479fc15f5
|
@ -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()
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user