Skip to content

Commit

Permalink
Fixed deprecation warning on Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
timgraham committed Sep 7, 2013
1 parent adc0ab3 commit b7451b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/serializers/tests.py
Expand Up @@ -500,8 +500,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")
Expand Down

0 comments on commit b7451b7

Please sign in to comment.