MCPcopy
hub / github.com/django/django / test_combine_and_empty

Method test_combine_and_empty

tests/queries/test_q.py:29–36  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

27
28class QTests(SimpleTestCase):
29 def test_combine_and_empty(self):
30 q = Q(x=1)
31 self.assertEqual(q & Q(), q)
32 self.assertEqual(Q() & q, q)
33
34 q = Q(x__in={}.keys())
35 self.assertEqual(q & Q(), q)
36 self.assertEqual(Q() & q, q)
37
38 def test_combine_and_both_empty(self):
39 self.assertEqual(Q() & Q(), Q())

Callers

nothing calls this directly

Calls 2

QClass · 0.90
keysMethod · 0.45

Tested by

no test coverage detected