'Test for ticket #4371 -- Loading data of an unknown format should fail
Validate that error conditions are caught correctly'

def test_unknown_format(self):

    stderr = StringIO()
    management.call_command('loaddata', 'bad_fixture1.unkn', verbosity=0, commit=False, stderr=stderr)
    self.assertEqual(stderr.getvalue(), "Problem    installing    fixture    'bad_fixture1':    unkn    is    not    a    known    serialization    format.\n")
