mirror of
https://github.com/django/django.git
synced 2025-08-21 01:09:13 +00:00
Corrected assertNumQueries() example in docs/topics/testing/tools.txt.
This commit is contained in:
parent
8914f4703c
commit
dca8284a37
@ -1895,7 +1895,7 @@ your test suite.
|
|||||||
If a ``"using"`` key is present in ``kwargs`` it is used as the database
|
If a ``"using"`` key is present in ``kwargs`` it is used as the database
|
||||||
alias for which to check the number of queries::
|
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
|
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::
|
wrapping the call with a ``lambda`` to add an extra parameter::
|
||||||
|
Loading…
x
Reference in New Issue
Block a user