MCPcopy
hub / github.com/django/django / test_extra_ordering_with_table_name

Method test_extra_ordering_with_table_name

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

Source from the content-addressed store, hash-verified

376 )
377
378 def test_extra_ordering_with_table_name(self):
379 self.assertQuerySetEqual(
380 Article.objects.extra(order_by=["ordering_article.headline"]),
381 [
382 "Article 1",
383 "Article 2",
384 "Article 3",
385 "Article 4",
386 ],
387 attrgetter("headline"),
388 )
389 self.assertQuerySetEqual(
390 Article.objects.extra(order_by=["-ordering_article.headline"]),
391 [
392 "Article 4",
393 "Article 3",
394 "Article 2",
395 "Article 1",
396 ],
397 attrgetter("headline"),
398 )
399
400 def test_alias_with_period_shadows_table_name(self):
401 """

Callers

nothing calls this directly

Calls 2

assertQuerySetEqualMethod · 0.80
extraMethod · 0.45

Tested by

no test coverage detected