mirror of
https://github.com/django/django.git
synced 2025-08-08 12:58:37 +00:00
[5.2.x] Corrected assertNumQueries() example in docs/topics/testing/tools.txt.
Backport of dca8284a37
from main.
This commit is contained in:
parent
b3bb7230e1
commit
5ca58ce3d0
1 changed files with 1 additions and 1 deletions
|
@ -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::
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue