MCPcopy
hub / github.com/django/django / test_extra_ordering

Method test_extra_ordering

tests/ordering/tests.py:343–358  ·  view source on GitHub ↗

Ordering can be based on fields included from an 'extra' clause

(self)

Source from the content-addressed store, hash-verified

341 qs.last()
342
343 def test_extra_ordering(self):
344 """
345 Ordering can be based on fields included from an 'extra' clause
346 """
347 self.assertQuerySetEqual(
348 Article.objects.extra(
349 select={"foo": "pub_date"}, order_by=["foo", "headline"]
350 ),
351 [
352 "Article 1",
353 "Article 2",
354 "Article 3",
355 "Article 4",
356 ],
357 attrgetter("headline"),
358 )
359
360 def test_extra_ordering_quoting(self):
361 """

Callers

nothing calls this directly

Calls 2

assertQuerySetEqualMethod · 0.80
extraMethod · 0.45

Tested by

no test coverage detected