summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-09-06 20:36:17 -0400
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-09-07 13:15:13 -0500
commitbe9930d7bedc78486d5294a2914585e01c492385 (patch)
treede8c6d635497b6931a1dfc1bec3c282216947983
parent63b95ca452ea7ef1103e599f8dd733b67278c8dc (diff)
[1.6.x] Fixed deprecation warning on Python 3
Backport of b7451b72 from master.
-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 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")