mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #23919 -- Simplified assertRaisesRegex()'s that accounted for Python 2.
This commit is contained in:
committed by
Aymeric Augustin
parent
dc8834cad4
commit
109b33f64c
@@ -450,7 +450,7 @@ class WriterTests(SimpleTestCase):
|
||||
self.assertEqual(string, "migrations.test_writer.EmailValidator(message='hello')")
|
||||
|
||||
validator = deconstructible(path="custom.EmailValidator")(EmailValidator)(message="hello")
|
||||
with self.assertRaisesRegex(ImportError, "No module named '?custom'?"):
|
||||
with self.assertRaisesMessage(ImportError, "No module named 'custom'"):
|
||||
MigrationWriter.serialize(validator)
|
||||
|
||||
validator = deconstructible(path="django.core.validators.EmailValidator2")(EmailValidator)(message="hello")
|
||||
|
||||
Reference in New Issue
Block a user