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

@ -3,10 +3,9 @@ import pytest
from unwind import db, models, web_models
pytestmark = pytest.mark.asyncio
async def test_add_and_get(shared_conn):
@pytest.mark.asyncio
async def test_add_and_get(shared_conn: db.Database):
async with shared_conn.transaction(force_rollback=True):
m1 = models.Movie(
@ -31,7 +30,8 @@ async def test_add_and_get(shared_conn):
assert m2 == await db.get(models.Movie, id=str(m2.id))
async def test_find_ratings(shared_conn):
@pytest.mark.asyncio
async def test_find_ratings(shared_conn: db.Database):
async with shared_conn.transaction(force_rollback=True):
m1 = models.Movie(