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