MCPcopy
hub / github.com/django/django / test_order_by_key

Method test_order_by_key

tests/db_functions/json/test_json_array.py:100–102  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

98 self.assertNotIn("::varchar)::varchar", sql)
99
100 def test_order_by_key(self):
101 qs = Author.objects.annotate(arr=JSONArray(F("alias"))).order_by("arr__0")
102 self.assertQuerySetEqual(qs, Author.objects.order_by("alias"))
103
104 def test_order_by_nested_key(self):
105 qs = Author.objects.annotate(arr=JSONArray(JSONArray(F("alias")))).order_by(

Callers

nothing calls this directly

Calls 5

JSONArrayClass · 0.90
FClass · 0.90
order_byMethod · 0.80
annotateMethod · 0.80
assertQuerySetEqualMethod · 0.80

Tested by

no test coverage detected