mirror of
https://github.com/django/django.git
synced 2025-07-30 16:44:30 +00:00
Fixed #15359 -- Ensure that the -h option is always honored by django-admin.py. Thanks to teubank for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15605 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
b700c3a918
commit
b151bccdcc
2 changed files with 11 additions and 1 deletions
|
@ -1115,6 +1115,16 @@ class CommandTypes(AdminScriptTestCase):
|
|||
self.assertOutput(out, "Usage: manage.py subcommand [options] [args]")
|
||||
self.assertOutput(err, "Type 'manage.py help <subcommand>' for help on a specific subcommand.")
|
||||
|
||||
def test_short_help(self):
|
||||
"-h is handled as a short form of --help"
|
||||
args = ['-h']
|
||||
out, err = self.run_manage(args)
|
||||
if sys.version_info < (2, 5):
|
||||
self.assertOutput(out, "usage: manage.py subcommand [options] [args]")
|
||||
else:
|
||||
self.assertOutput(out, "Usage: manage.py subcommand [options] [args]")
|
||||
self.assertOutput(err, "Type 'manage.py help <subcommand>' for help on a specific subcommand.")
|
||||
|
||||
def test_specific_help(self):
|
||||
"--help can be used on a specific command"
|
||||
args = ['sqlall','--help']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue