Created
November 15, 2021 13:02
-
-
Save codemation/d44859e2ecd0b2ed418a0af3198ceb5a to your computer and use it in GitHub Desktop.
pydbantic_db_fixture.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@pytest.mark.asyncio | |
@pytest.fixture(params=[DB_URL]) | |
async def database_with_cache(request): | |
db = await Database.create( | |
request.param, | |
tables=[Employee], | |
cache_enabled=True, | |
testing=True | |
) | |
yield db |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment