chore: update to latest pytest (#2800)
This commit is contained in:
parent
8ff4962e86
commit
291c69e470
27 changed files with 303 additions and 310 deletions
|
|
@ -1,23 +1,28 @@
|
|||
import pytest_asyncio
|
||||
import pytest
|
||||
|
||||
from .helpers import get_hold_invoice, get_real_invoice
|
||||
|
||||
|
||||
@pytest_asyncio.fixture(scope="function")
|
||||
@pytest.fixture(scope="session")
|
||||
def anyio_backend():
|
||||
return "asyncio"
|
||||
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
async def hold_invoice():
|
||||
invoice = get_hold_invoice(100)
|
||||
yield invoice
|
||||
del invoice
|
||||
|
||||
|
||||
@pytest_asyncio.fixture(scope="function")
|
||||
@pytest.fixture(scope="function")
|
||||
async def real_invoice():
|
||||
invoice = get_real_invoice(100)
|
||||
yield {"bolt11": invoice["payment_request"]}
|
||||
del invoice
|
||||
|
||||
|
||||
@pytest_asyncio.fixture(scope="function")
|
||||
@pytest.fixture(scope="function")
|
||||
async def real_amountless_invoice():
|
||||
invoice = get_real_invoice(0)
|
||||
yield invoice["payment_request"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue