mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #19724 -- Output note when showing only core management commands
When listing available management commands, only core commands are listed if settings have any error. This commit adds a note in this case so errors are not totally silently skipped. Thanks Peter Davis for the report.
This commit is contained in:
@@ -1055,6 +1055,17 @@ class ManageSettingsWithSettingsErrors(AdminScriptTestCase):
|
||||
self.assertNoOutput(out)
|
||||
self.assertOutput(err, "KeyError: 'blah'")
|
||||
|
||||
def test_help(self):
|
||||
"""
|
||||
Test listing available commands output note when only core commands are
|
||||
available.
|
||||
"""
|
||||
self.write_settings('settings.py', sdict={'MEDIA_URL': '"/no_ending_slash"'})
|
||||
args = ['help']
|
||||
out, err = self.run_manage(args)
|
||||
self.assertOutput(out, 'only Django core commands are listed')
|
||||
self.assertNoOutput(err)
|
||||
|
||||
|
||||
class ManageValidate(AdminScriptTestCase):
|
||||
def tearDown(self):
|
||||
|
||||
Reference in New Issue
Block a user