Skip to content

Commit

Permalink
add assertion for _engine_async
Browse files Browse the repository at this point in the history
  • Loading branch information
ychiucco committed Sep 18, 2024
1 parent f1e113c commit 7815572
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/fixtures_testserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,13 @@ def run_server():

# Cleanup DB
engine_sync.dispose()
try:
DB._engine_async
raise
except AttributeError:
# we show here that we do not need to dispose of `engine_async`,
# because it is never used.
pass
SQLModel.metadata.drop_all(engine_sync)
logger.debug("Dropped all tables from the database.")

Expand Down

0 comments on commit 7815572

Please sign in to comment.