fix connecting
This commit is contained in:
@ -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()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user