File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -656,11 +656,13 @@ def _assert_num_queries(
656
656
657
657
@pytest .fixture ()
658
658
def django_assert_num_queries (pytestconfig : pytest .Config ) -> DjangoAssertNumQueries :
659
+ """Allows to check for an expected number of DB queries."""
659
660
return partial (_assert_num_queries , pytestconfig )
660
661
661
662
662
663
@pytest .fixture ()
663
664
def django_assert_max_num_queries (pytestconfig : pytest .Config ) -> DjangoAssertNumQueries :
665
+ """Allows to check for an expected maximum number of DB queries."""
664
666
return partial (_assert_num_queries , pytestconfig , exact = False )
665
667
666
668
@@ -678,6 +680,7 @@ def __call__(
678
680
679
681
@pytest .fixture ()
680
682
def django_capture_on_commit_callbacks () -> DjangoCaptureOnCommitCallbacks :
683
+ """Captures transaction.on_commit() callbacks for the given database connection."""
681
684
from django .test import TestCase
682
685
683
686
return TestCase .captureOnCommitCallbacks # type: ignore[no-any-return]
You can’t perform that action at this time.
0 commit comments