mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase.
This commit is contained in:
@@ -465,7 +465,7 @@ class WriterTests(SimpleTestCase):
|
||||
self.assertEqual(string, "migrations.test_writer.EmailValidator(message='hello')")
|
||||
|
||||
validator = deconstructible(path="custom.EmailValidator")(EmailValidator)(message="hello")
|
||||
with six.assertRaisesRegex(self, ImportError, "No module named '?custom'?"):
|
||||
with self.assertRaisesRegex(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