Skip to content
Browse files

Fixed deprecation warning on Python 3

  • Loading branch information...
1 parent adc0ab3 commit b7451b72edfde0c1ad3c6e33a7a170f16fc53083 @timgraham timgraham committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/serializers/
4 tests/serializers/
@@ -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")

0 comments on commit b7451b7

Please sign in to comment.
Something went wrong with that request. Please try again.