fix tests for Pytest-Asyncio running in strict mode
This commit is contained in:
parent
099770c80c
commit
324eb8e9b7
4 changed files with 12 additions and 12 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue