Skip to content

Commit

Permalink
test: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
klen committed Jul 31, 2024
1 parent e6506bf commit 0b42cec
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/test_pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@
from asgi_tools._compat import aio_sleep


@pytest.fixture(params=["asyncio", "curio"], scope="session")
def aiolib(request):
return request.param


@pytest.fixture()
def name(app):
return app.cfg.name


async def test_app_imported(app):
assert app.cfg.name == "muffin"
await aio_sleep(0.2)


async def test_app_available_in_fixture(name):
assert name == "muffin"
await aio_sleep(0.2)


async def test_app_lifespan(app):
assert app.state == "started"
await aio_sleep(0.2)

0 comments on commit 0b42cec

Please sign in to comment.