diff options
Diffstat (limited to 'tests/validators')
| -rw-r--r-- | tests/validators/tests.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/validators/tests.py b/tests/validators/tests.py index 8620e7dc35..bc8ee7fb1d 100644 --- a/tests/validators/tests.py +++ b/tests/validators/tests.py @@ -334,7 +334,8 @@ class TestSimpleValidators(SimpleTestCase): self.assertEqual(repr(v), "ValidationError({'first': ['First Problem']})") def test_regex_validator_flags(self): - with self.assertRaises(TypeError): + msg = 'If the flags are set, regex must be a regular expression string.' + with self.assertRaisesMessage(TypeError, msg): RegexValidator(re.compile('a'), flags=re.IGNORECASE) def test_max_length_validator_message(self): |
