'Test for ticket #4371 -- Loading a fixture file with invalid data
using explicit filename.
Validate that error conditions are caught correctly'

def test_invalid_data(self):

    stderr = StringIO()
    management.call_command('loaddata', 'bad_fixture2.xml', verbosity=0, commit=False, stderr=stderr)
    self.assertEqual(stderr.getvalue(), "No    fixture    data    found    for    'bad_fixture2'.    (File    format    may    be    invalid.)\n")
