MCPcopy
hub / github.com/django/django / test_annotated_default_ordering

Method test_annotated_default_ordering

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

Source from the content-addressed store, hash-verified

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"))
2380 self.assertIs(qs.ordered, False)
2381 self.assertIs(qs.order_by("name").ordered, True)
2382
2383 def test_annotated_values_default_ordering(self):
2384 qs = Tag.objects.values("name").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