MCPcopy
hub / github.com/django/django / test_order_by_expr_query_reuse

Method test_order_by_expr_query_reuse

tests/ordering/tests.py:687–691  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

685 )
686
687 def test_order_by_expr_query_reuse(self):
688 qs = Author.objects.annotate(num=Count("article")).order_by(
689 F("num").desc(), "pk"
690 )
691 self.assertCountEqual(qs, qs.iterator())
692
693
694class TotallyOrderedTests(SimpleTestCase):

Callers

nothing calls this directly

Calls 6

CountClass · 0.90
FClass · 0.90
order_byMethod · 0.80
annotateMethod · 0.80
descMethod · 0.45
iteratorMethod · 0.45

Tested by

no test coverage detected