Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed deprecation warning on Python 3

  • Loading branch information...
commit b7451b72edfde0c1ad3c6e33a7a170f16fc53083 1 parent adc0ab3
Tim Graham timgraham authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/serializers/tests.py
4 tests/serializers/tests.py
View
@@ -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")
Please sign in to comment.
Something went wrong with that request. Please try again.