Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.6.x] Fixed deprecation warning on Python 3

Backport of b7451b7 from master.
  • Loading branch information...
commit be9930d7bedc78486d5294a2914585e01c492385 1 parent 63b95ca
@timgraham timgraham authored aaugustin committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/serializers/
4 tests/serializers/
@@ -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")
Please sign in to comment.
Something went wrong with that request. Please try again.