Permalink
Browse files

[1.6.x] Fixed deprecation warning on Python 3

Backport of b7451b7 from master.
  • Loading branch information...
1 parent 63b95ca commit be9930d7bedc78486d5294a2914585e01c492385 @timgraham timgraham committed with aaugustin Sep 7, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/serializers/tests.py
@@ -487,8 +487,8 @@ def test_deserializer_pyyaml_error_message(self):
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")

0 comments on commit be9930d

Please sign in to comment.