pytest quibbles and dev dependencies.
This commit is contained in:
parent
ef0bdf8363
commit
cd8a447ba0
5 changed files with 42 additions and 69 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue