summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-09-06 20:36:17 -0400
committerTim Graham <timograham@gmail.com>2013-09-06 20:36:17 -0400
commitb7451b72edfde0c1ad3c6e33a7a170f16fc53083 (patch)
tree7a6cbed94ea5d3bb54d4d28140e31fda119a6f3d
parentadc0ab3386520874dbc96c2f905fd66769b8f16d (diff)
Fixed deprecation warning on Python 3
-rw-r--r--tests/serializers/tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/serializers/tests.py b/tests/serializers/tests.py
index 9af8165314..458847e4c7 100644
--- a/tests/serializers/tests.py
+++ b/tests/serializers/tests.py
@@ -500,8 +500,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")