diff options
Diffstat (limited to 'tests/fixtures_regress/tests.py')
| -rw-r--r-- | tests/fixtures_regress/tests.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/fixtures_regress/tests.py b/tests/fixtures_regress/tests.py index 02e923e386..df84d77a3f 100644 --- a/tests/fixtures_regress/tests.py +++ b/tests/fixtures_regress/tests.py @@ -441,13 +441,14 @@ class TestFixtures(TestCase): def test_loaddata_not_existant_fixture_file(self): stdout_output = StringIO() - management.call_command( - 'loaddata', - 'this_fixture_doesnt_exist', - verbosity=2, - commit=False, - stdout=stdout_output, - ) + with self.assertRaises(management.CommandError): + management.call_command( + 'loaddata', + 'this_fixture_doesnt_exist', + verbosity=2, + commit=False, + stdout=stdout_output, + ) self.assertTrue("No xml fixture 'this_fixture_doesnt_exist' in" in force_text(stdout_output.getvalue())) |
