chore: update to latest pytest (#2800)

This commit is contained in:
dni ⚡ 2024-12-11 10:39:28 +01:00 committed by GitHub
parent 8ff4962e86
commit 291c69e470
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 303 additions and 310 deletions

View file

@ -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"]