mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #18387 -- Do not call sys.exit during call_command.
Moved sys.exit(1) so as failing management commands reach it only when running from command line.
This commit is contained in:
@@ -185,14 +185,14 @@ class FixtureLoadingTests(TestCase):
|
||||
exclude_list=['fixtures.Article', 'fixtures.Book', 'sites'])
|
||||
|
||||
# Excluding a bogus app should throw an error
|
||||
self.assertRaises(SystemExit,
|
||||
self.assertRaises(management.CommandError,
|
||||
self._dumpdata_assert,
|
||||
['fixtures', 'sites'],
|
||||
'',
|
||||
exclude_list=['foo_app'])
|
||||
|
||||
# Excluding a bogus model should throw an error
|
||||
self.assertRaises(SystemExit,
|
||||
self.assertRaises(management.CommandError,
|
||||
self._dumpdata_assert,
|
||||
['fixtures', 'sites'],
|
||||
'',
|
||||
|
||||
Reference in New Issue
Block a user