MCPcopy
hub / github.com/django/django / test_annotated_ordering

Method test_annotated_ordering

tests/queries/tests.py:2373–2376  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2371 self.assertIs(Annotation.objects.extra(order_by=["id"]).ordered, True)
2372
2373 def test_annotated_ordering(self):
2374 qs = Annotation.objects.annotate(num_notes=Count("notes"))
2375 self.assertIs(qs.ordered, False)
2376 self.assertIs(qs.order_by("num_notes").ordered, True)
2377
2378 def test_annotated_default_ordering(self):
2379 qs = Tag.objects.annotate(num_notes=Count("pk"))

Callers

nothing calls this directly

Calls 3

CountClass · 0.90
annotateMethod · 0.80
order_byMethod · 0.80

Tested by

no test coverage detected