-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
I have covered an endpoint with a test that counts DB queries and reveled n+1 issue.
The n+1 issue is only reproduced in tests so it seems to be related to this line (also if I remove this line the test pass):
https://github.com/jeancochrane/pytest-flask-sqlalchemy/blob/master/pytest_flask_sqlalchemy/fixtures.py#L59
In my app.py, I set following session_options:
db = SQLA(session_options={"autocommit": False, "autoflush": False, "expire_on_commit": False})
I guess, expire_on_commit
option should be considered in the restart_savepoint
function before expiring all objects.
What do you think?
Metadata
Metadata
Assignees
Labels
No labels