pytest quibbles and dev dependencies.
This commit is contained in:
+3
-2
@@ -4,9 +4,10 @@ from lnbits.app import create_app
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def client():
|
||||
@pytest.mark.asyncio
|
||||
async def client():
|
||||
app = create_app()
|
||||
app.config["TESTING"] = True
|
||||
|
||||
with app.test_client() as client:
|
||||
async with app.test_client() as client:
|
||||
yield client
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
def test_homepage(client):
|
||||
r = client.get("/")
|
||||
assert b"Add a new wallet" in r.data
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_homepage(client):
|
||||
r = await client.get("/")
|
||||
assert b"Add a new wallet" in await r.get_data()
|
||||
|
||||
Reference in New Issue
Block a user