fix connecting

This commit is contained in:
collerek
2020-12-07 13:08:07 +01:00
parent 5f1ee7ad9c
commit f08ae49834

View File

@ -46,6 +46,8 @@ def create_test_database():
@pytest.mark.asyncio @pytest.mark.asyncio
async def test_model_relationship(): async def test_model_relationship():
async with db:
async with db.transaction(force_rollback=True):
cat = await Category(name="Foo", code=123).save() cat = await Category(name="Foo", code=123).save()
ws = await Workshop(topic="Topic 1", category=cat).save() ws = await Workshop(topic="Topic 1", category=cat).save()