diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2011-02-21 13:45:57 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2011-02-21 13:45:57 +0000 |
| commit | b151bccdcc654856b849ab19b6deb68c22794e23 (patch) | |
| tree | 52ec089617b2429dcb82ba155f19ff072fdf590c /tests/regressiontests/admin_scripts/tests.py | |
| parent | b700c3a918a03ea0aa4fd16690af82c21813a6ae (diff) | |
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
Diffstat (limited to 'tests/regressiontests/admin_scripts/tests.py')
| -rw-r--r-- | tests/regressiontests/admin_scripts/tests.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/regressiontests/admin_scripts/tests.py b/tests/regressiontests/admin_scripts/tests.py index 5c2f5d7fb6..76cecc0842 100644 --- a/tests/regressiontests/admin_scripts/tests.py +++ b/tests/regressiontests/admin_scripts/tests.py @@ -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'] |
