'Calling dumpdata produces an error when yaml package missing'

def test_dumpdata_pyyaml_error_message(self):

    with six.assertRaisesRegex(self, management.CommandError, YAML_IMPORT_ERROR_MESSAGE):
        management.call_command(u'dumpdata', format=u'yaml')
