MCPcopy
hub / github.com/django/django / test_ticket7791

Method test_ticket7791

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

Source from the content-addressed store, hash-verified

915 q.extra(select={"foo": "1"})
916
917 def test_ticket7791(self):
918 # There were "issues" when ordering and distinct-ing on fields related
919 # via ForeignKeys.
920 self.assertEqual(len(Note.objects.order_by("extrainfo__info").distinct()), 3)
921
922 # Pickling of QuerySets using datetimes() should work.
923 qs = Item.objects.datetimes("created", "month")
924 pickle.loads(pickle.dumps(qs))
925
926 def test_ticket9997(self):
927 # If a ValuesList or Values queryset is passed as an inner query, we

Callers

nothing calls this directly

Calls 5

distinctMethod · 0.80
order_byMethod · 0.80
datetimesMethod · 0.80
loadsMethod · 0.45
dumpsMethod · 0.45

Tested by

no test coverage detected