fix tests for Pytest-Asyncio running in strict mode

This commit is contained in:
ducklet 2023-02-04 18:12:50 +01:00
parent 099770c80c
commit 324eb8e9b7
4 changed files with 12 additions and 12 deletions

View file

@ -4,13 +4,11 @@ import pytest
from unwind import create_app
from unwind import db, models, imdb
# https://pypi.org/project/pytest-asyncio/
pytestmark = pytest.mark.asyncio
app = create_app()
async def test_app(shared_conn):
@pytest.mark.asyncio
async def test_app(shared_conn: db.Database):
async with shared_conn.transaction(force_rollback=True):
# https://www.starlette.io/testclient/