connect db <facepalm>

This commit is contained in:
collerek
2020-10-28 15:38:15 +01:00
parent 29d04887b1
commit f96845674b

View File

@ -51,6 +51,8 @@ def test_table_defined_properly():
@pytest.mark.asyncio @pytest.mark.asyncio
async def test_model_creation(): async def test_model_creation():
async with database:
async with database.transaction(force_rollback=True):
p1 = Product(name='Test') p1 = Product(name='Test')
assert p1.created is None assert p1.created is None
await p1.save() await p1.save()