diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-08-29 09:29:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-29 09:29:46 +0200 |
| commit | c7f656435cbf4feee3515ae67cfbe12d6bf791fb (patch) | |
| tree | bb7efccae74c4b163b5913041c774e0479e3a48a | |
| parent | a44d80f88e22eda24dacef48e368895ebea96635 (diff) | |
Added tests for raising an error when passing non-boolean expression to When().
| -rw-r--r-- | tests/expressions_case/tests.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/expressions_case/tests.py b/tests/expressions_case/tests.py index 94731491e0..f1255cb8e9 100644 --- a/tests/expressions_case/tests.py +++ b/tests/expressions_case/tests.py @@ -1331,6 +1331,8 @@ class CaseWhenTests(SimpleTestCase): with self.assertRaisesMessage(TypeError, msg): When(condition=object()) with self.assertRaisesMessage(TypeError, msg): + When(condition=Value(1, output_field=models.IntegerField())) + with self.assertRaisesMessage(TypeError, msg): When() def test_empty_q_object(self): |
