MCPcopy
hub / github.com/django/django / test_ticket_19151

Method test_ticket_19151

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

Source from the content-addressed store, hash-verified

2683 )
2684
2685 def test_ticket_19151(self):
2686 # #19151 -- Calling .values() or .values_list() on an empty QuerySet
2687 # should return an empty QuerySet and not cause an error.
2688 q = Author.objects.none()
2689 self.assertCountEqual(q.values(), [])
2690 self.assertCountEqual(q.values_list(), [])
2691
2692
2693class ValuesQuerysetTests(TestCase):

Callers

nothing calls this directly

Calls 3

noneMethod · 0.80
values_listMethod · 0.80
valuesMethod · 0.45

Tested by

no test coverage detected