Add yield1

This commit is contained in:
collerek
2021-03-12 18:22:59 +07:00
committed by GitHub
parent ff9d412508
commit 1c63b1c80f

View File

@ -72,8 +72,10 @@ def create_test_database():
@pytest.fixture(autouse=True, scope="function") @pytest.fixture(autouse=True, scope="function")
async def cleanup(): async def cleanup():
await Book.objects.delete(each=True) yield
await Author.objects.delete(each=True) async with database:
await Book.objects.delete(each=True)
await Author.objects.delete(each=True)
@pytest.mark.asyncio @pytest.mark.asyncio