-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds ability to capture all the db queries at once #1177
base: main
Are you sure you want to change the base?
Conversation
@bluetech let me know if there is something you want me to change |
This seems sensible to me. One thing, pytest-django tries to mostly follow Django upstream, and just uses Would you consider sending your suggestion to the Django developer list (https://forum.djangoproject.com/c/internals/5), or open a Django ticket to discuss it? |
Yes, this seems like a good feature to add upstream first. I would propose it extending Adding another fixture with “all connections” part in the name ( |
When managing multiple databases—over six in our case—we don’t focus on tracking queries for each one individually (e.g., db1 vs. db2 vs. db3). Instead, our priority is the overall number of queries executed. If that total seems off, we then dive deeper to identify the specific issue.
Old approach:
Since we use a django database router these model's data store can change location due to size at any moment. When this happens, all our tests will break.
New approach: