summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/queries/test_q.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/queries/test_q.py b/tests/queries/test_q.py
index 7be2361f04..a90d6794db 100644
--- a/tests/queries/test_q.py
+++ b/tests/queries/test_q.py
@@ -11,6 +11,14 @@ class QTests(SimpleTestCase):
def test_combine_and_both_empty(self):
self.assertEqual(Q() & Q(), Q())
+ def test_combine_or_empty(self):
+ q = Q(x=1)
+ self.assertEqual(q | Q(), q)
+ self.assertEqual(Q() | q, q)
+
+ def test_combine_or_both_empty(self):
+ self.assertEqual(Q() | Q(), Q())
+
def test_deconstruct(self):
q = Q(price__gt=F('discounted_price'))
path, args, kwargs = q.deconstruct()