Fix a regression in assertQueries and update our dependency.
Review Request #14384 — Created March 20, 2025 and submitted — Latest diff uploaded
assertQueries()
was updated to wrapdjango-assert-queries
, but this
ended up being invoked incorrectly, causing the assertion to always
succeed. We were yielding the result and not entering its context.This change updates the call to simply return the
assert_queries()
's
context manager directly. This avoids the issue and avoids wrapping in
another layer of context managers.We also now depend on django-assert-queries 2.0.1, which, along with the
above, has the added benefit of not includingassertQueries()
in the
stack trace.
Djblets unit tests pass.
djblets/dependencies.py |
---|
djblets/testing/testcases.py |
---|