mirror of
https://github.com/lnbits/lnbits.git
synced 2025-08-06 19:36:13 +02:00
TEST: add helpers and a test to pay external invoice (#1414)
* add helpers and a test to pay external invoice * skip real test in fakewallet * formatting * fix test * formatting
This commit is contained in:
@@ -9,7 +9,7 @@ from lnbits.core.crud import create_account, create_wallet
|
||||
from lnbits.core.views.api import CreateInvoiceData, api_payments_create_invoice
|
||||
from lnbits.db import Database
|
||||
from lnbits.settings import settings
|
||||
from tests.helpers import credit_wallet, get_random_invoice_data
|
||||
from tests.helpers import credit_wallet, get_random_invoice_data, get_real_invoice
|
||||
|
||||
|
||||
@pytest_asyncio.fixture(scope="session")
|
||||
@@ -123,3 +123,10 @@ async def invoice(to_wallet):
|
||||
invoice = await api_payments_create_invoice(invoiceData, to_wallet)
|
||||
yield invoice
|
||||
del invoice
|
||||
|
||||
|
||||
@pytest_asyncio.fixture(scope="session")
|
||||
async def real_invoice():
|
||||
invoice = get_real_invoice(100_000, "test-fixture")
|
||||
yield invoice
|
||||
del invoice
|
||||
|
Reference in New Issue
Block a user