Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed deprecation warning on Python 3

  • Loading branch information...
commit b7451b72edfde0c1ad3c6e33a7a170f16fc53083 1 parent adc0ab3
Tim Graham authored September 06, 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
@@ -500,8 +500,8 @@ def test_deserializer_pyyaml_error_message(self):
500 500
 
501 501
     def test_dumpdata_pyyaml_error_message(self):
502 502
         """Calling dumpdata produces an error when yaml package missing"""
503  
-        self.assertRaisesRegexp(management.CommandError, YAML_IMPORT_ERROR_MESSAGE,
504  
-                management.call_command, 'dumpdata', format='yaml')
  503
+        with six.assertRaisesRegex(self, management.CommandError, YAML_IMPORT_ERROR_MESSAGE):
  504
+            management.call_command('dumpdata', format='yaml')
505 505
 
506 506
 
507 507
 @unittest.skipUnless(HAS_YAML, "No yaml library detected")

0 notes on commit b7451b7

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