diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/queries/test_q.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/queries/test_q.py b/tests/queries/test_q.py index cdf40292b0..5f20a41768 100644 --- a/tests/queries/test_q.py +++ b/tests/queries/test_q.py @@ -225,6 +225,11 @@ class QTests(SimpleTestCase): Q(*items, _connector=connector), ) + def test_connector_validation(self): + msg = f"_connector must be one of {Q.AND!r}, {Q.OR!r}, {Q.XOR!r}, or None." + with self.assertRaisesMessage(ValueError, msg): + Q(_connector="evil") + class QCheckTests(TestCase): def test_basic(self): |
