Track subqueries in Q filter values in catch_queries().

Review Request #13404 — Created Nov. 6, 2023 and submitted

Information

Djblets
release-3.x

Reviewers

catch_queries() now looks for Q(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.

Summary ID
Track subqueries in Q filter values in catch_queries().
`catch_queries()` now looks for `Q(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.
82bb678fd2b1b6c44e589f35bce68de4a484f6cc
Description From Last Updated

local variable 'objs' is assigned to but never used Column: 13 Error code: F841

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

chipx86
david
  1. Ship It!
  2. 
      
maubin
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.x (2784d13)
Loading...