Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.6.x] Fixed deprecation warning on Python 3

Backport of b7451b7 from master.
  • Loading branch information...
commit be9930d7bedc78486d5294a2914585e01c492385 1 parent 63b95ca
Tim Graham authored September 06, 2013 aaugustin committed September 07, 2013

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  tests/serializers/tests.py
4  tests/serializers/tests.py
@@ -487,8 +487,8 @@ def test_deserializer_pyyaml_error_message(self):
487 487
 
488 488
     def test_dumpdata_pyyaml_error_message(self):
489 489
         """Calling dumpdata produces an error when yaml package missing"""
490  
-        self.assertRaisesRegexp(management.CommandError, YAML_IMPORT_ERROR_MESSAGE,
491  
-                management.call_command, 'dumpdata', format='yaml')
  490
+        with six.assertRaisesRegex(self, management.CommandError, YAML_IMPORT_ERROR_MESSAGE):
  491
+            management.call_command('dumpdata', format='yaml')
492 492
 
493 493
 
494 494
 @unittest.skipUnless(HAS_YAML, "No yaml library detected")

0 notes on commit be9930d

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