0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00

Fixed deprecation warning on Python 3

This commit is contained in:
Tim Graham 2013-09-06 20:36:17 -04:00
parent adc0ab3386
commit b7451b72ed

View File

@ -500,8 +500,8 @@ class NoYamlSerializerTestCase(TestCase):
def test_dumpdata_pyyaml_error_message(self): def test_dumpdata_pyyaml_error_message(self):
"""Calling dumpdata produces an error when yaml package missing""" """Calling dumpdata produces an error when yaml package missing"""
self.assertRaisesRegexp(management.CommandError, YAML_IMPORT_ERROR_MESSAGE, with six.assertRaisesRegex(self, management.CommandError, YAML_IMPORT_ERROR_MESSAGE):
management.call_command, 'dumpdata', format='yaml') management.call_command('dumpdata', format='yaml')
@unittest.skipUnless(HAS_YAML, "No yaml library detected") @unittest.skipUnless(HAS_YAML, "No yaml library detected")