diff options
| author | Hasan <hasan.r67@gmail.com> | 2016-01-18 12:15:45 +0330 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-01-29 13:37:33 -0500 |
| commit | 26ad01719d73823e65c0358a2ee9941e0a888a63 (patch) | |
| tree | 9e458f4c3428400e0970554ce19f6ed02e862a3b /tests/migrations/test_writer.py | |
| parent | 253adc2b8a52982139d40c4f55b3fd446e1cb8f3 (diff) | |
Refs #26022 -- Replaced six.assertRaisesRegex with assertRaisesMessage as appropriate.
Diffstat (limited to 'tests/migrations/test_writer.py')
| -rw-r--r-- | tests/migrations/test_writer.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/migrations/test_writer.py b/tests/migrations/test_writer.py index 7d0e457d40..03dd5f7ed3 100644 --- a/tests/migrations/test_writer.py +++ b/tests/migrations/test_writer.py @@ -296,7 +296,7 @@ class WriterTests(SimpleTestCase): ) def test_serialize_functions(self): - with six.assertRaisesRegex(self, ValueError, 'Cannot serialize function: lambda'): + with self.assertRaisesMessage(ValueError, 'Cannot serialize function: lambda'): self.assertSerializedEqual(lambda x: 42) self.assertSerializedEqual(models.SET_NULL) string, imports = MigrationWriter.serialize(models.SET(42)) @@ -463,8 +463,7 @@ class WriterTests(SimpleTestCase): return "somewhere dynamic" thing = models.FileField(upload_to=upload_to) - with six.assertRaisesRegex(self, ValueError, - '^Could not find function upload_to in migrations.test_writer'): + with self.assertRaisesMessage(ValueError, 'Could not find function upload_to in migrations.test_writer'): self.serialize_round_trip(TestModel2.thing) def test_serialize_managers(self): |
