mirror of
https://github.com/django/django.git
synced 2025-08-25 11:19:12 +00:00
[5.2.x] Corrected assertNumQueries() example in docs/topics/testing/tools.txt.
Backport of dca8284a376128c64bd0e0792ad12391ae3e7202 from main.
This commit is contained in:
parent
b3bb7230e1
commit
5ca58ce3d0
@ -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…
x
Reference in New Issue
Block a user