diff options
| author | Tim Graham <timograham@gmail.com> | 2013-09-06 20:36:17 -0400 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-09-07 13:15:13 -0500 |
| commit | be9930d7bedc78486d5294a2914585e01c492385 (patch) | |
| tree | de8c6d635497b6931a1dfc1bec3c282216947983 | |
| parent | 63b95ca452ea7ef1103e599f8dd733b67278c8dc (diff) | |
[1.6.x] Fixed deprecation warning on Python 3
Backport of b7451b72 from master.
| -rw-r--r-- | tests/serializers/tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/serializers/tests.py b/tests/serializers/tests.py index 987a887f4b..ba5bb34434 100644 --- a/tests/serializers/tests.py +++ b/tests/serializers/tests.py @@ -487,8 +487,8 @@ class NoYamlSerializerTestCase(TestCase): def test_dumpdata_pyyaml_error_message(self): """Calling dumpdata produces an error when yaml package missing""" - self.assertRaisesRegexp(management.CommandError, YAML_IMPORT_ERROR_MESSAGE, - management.call_command, 'dumpdata', format='yaml') + with six.assertRaisesRegex(self, management.CommandError, YAML_IMPORT_ERROR_MESSAGE): + management.call_command('dumpdata', format='yaml') @unittest.skipUnless(HAS_YAML, "No yaml library detected") |
