[5.2.x] Corrected assertNumQueries() example in docs/topics/testing/tools.txt.

Backport of dca8284a37 from main.
This commit is contained in:
Adam Zapletal 2025-08-01 16:58:28 -05:00 committed by Sarah Boyce
parent b3bb7230e1
commit 5ca58ce3d0

View file

@ -1950,7 +1950,7 @@ your test suite.
If a ``"using"`` key is present in ``kwargs`` it is used as the database
alias for which to check the number of queries::
self.assertNumQueries(7, using="non_default_db")
self.assertNumQueries(7, my_function, using="non_default_db")
If you wish to call a function with a ``using`` parameter you can do it by
wrapping the call with a ``lambda`` to add an extra parameter::