chore: update to latest pytest (#2800)

This commit is contained in:
dni ⚡
2024-12-11 11:39:28 +02:00
committed by GitHub
parent 8ff4962e86
commit 291c69e470
27 changed files with 303 additions and 310 deletions
+3 -3
View File
@@ -4,14 +4,14 @@ from lnbits.core.models import Payment
# check if the client is working
@pytest.mark.asyncio
@pytest.mark.anyio
async def test_core_views_generic(client):
response = await client.get("/")
assert response.status_code == 200
# check GET /public/v1/payment/{payment_hash}: correct hash [should pass]
@pytest.mark.asyncio
@pytest.mark.anyio
async def test_api_public_payment_longpolling(client, invoice: Payment):
response = await client.get(f"/public/v1/payment/{invoice.payment_hash}")
assert response.status_code < 300
@@ -19,7 +19,7 @@ async def test_api_public_payment_longpolling(client, invoice: Payment):
# check GET /public/v1/payment/{payment_hash}: wrong hash [should fail]
@pytest.mark.asyncio
@pytest.mark.anyio
async def test_api_public_payment_longpolling_wrong_hash(client, invoice: Payment):
response = await client.get(f"/public/v1/payment/{invoice.payment_hash + '0'*64}")
assert response.status_code == 404