Open
Description
This is more of a question/discussion - I'm trying to understand if there's a reason for the rather complex "session" fixture.
If you have an actual PG database already setup, all tables were recreated by setup_test_db
(that said, this is happening per session and not per test), why do you need a special flow to create the session and override the fast api dependency?
Some observations I made -
- The engine is returned before the transaction is completed in
setup_test_db
- is that how you are making sure the db remains clean? - That said, you begin a new transaction in
session
fixture. At the end, you rollback the connection (but assuming some "commits" might have happened). end_savepoint
- what is the point of it? if I understand correctly, it will automatically re-start a nested transaction when one is over in a sync session. But why?
Appreciate your clarifications!
Metadata
Metadata
Assignees
Labels
No labels