diff --git a/tests/conftest.py b/tests/conftest.py index 57df793..66d7528 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -36,7 +36,7 @@ from litecord.blueprints.auth import make_token @pytest.fixture(name="app") -def _test_app(unused_tcp_port, event_loop): +async def _test_app(unused_tcp_port): set_blueprints(main_app) main_app.config["_testing"] = True @@ -53,13 +53,13 @@ def _test_app(unused_tcp_port, event_loop): main_app.config["REGISTRATIONS"] = True # make sure we're calling the before_serving hooks - event_loop.run_until_complete(main_app.startup()) + await main_app.startup() # https://docs.pytest.org/en/latest/fixture.html#fixture-finalization-executing-teardown-code yield main_app # properly teardown - event_loop.run_until_complete(main_app.shutdown()) + await main_app.shutdown() @pytest.fixture(name="test_cli")