Track subqueries in Q filter values in catch_queries().
Review Request #13404 — Created Nov. 6, 2023 and submitted — Latest diff uploaded
catch_queries()
now looks forQ(key=SubQuery)
expressions, such as
Q(pk__in=MyModel.objects.all())
, and records those expressions as
subqueries. This enables deeper comparison of these subqueries, rather
than the old behavior of comparing the resulting object lists.
Unit tests pass.
Verified that I could capture and compare the subqueries in some
in-progress unit tests.
Diff Revision 1
This is not the most recent revision of the diff. The latest diff is revision 2. See what's changed.
orig
1
2
Commits
djblets/db/query_catcher.py |
---|
djblets/db/query_comparator.py |
---|
djblets/db/tests/test_query_catcher.py |
---|