1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #29066 -- Allowed negating query expressions.

This commit is contained in:
priyanshsaxena
2018-01-28 15:57:15 +05:30
committed by Tim Graham
parent 6b2f8fb91c
commit 617d5f410f
5 changed files with 17 additions and 3 deletions

View File

@@ -1425,6 +1425,10 @@ class ReprTests(TestCase):
class CombinableTests(SimpleTestCase):
bitwise_msg = 'Use .bitand() and .bitor() for bitwise logical operations.'
def test_negation(self):
c = Combinable()
self.assertEqual(-c, c * -1)
def test_and(self):
with self.assertRaisesMessage(NotImplementedError, self.bitwise_msg):
Combinable() & Combinable()