diff options
| author | David Foster <david@dafoster.net> | 2018-04-07 17:10:05 -0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-04-11 13:52:20 -0400 |
| commit | c3055242c81812278ebdc93dd109f30d2cbd1610 (patch) | |
| tree | 06ce20f2e91915729ef83a8db2611153dfb5de0a /tests/admin_scripts | |
| parent | 2919a08c20d5ae48e381d6bd251d3b0d400d47d9 (diff) | |
Fixed #29301 -- Made management command --help display command-specific arguments before common arguments.
Diffstat (limited to 'tests/admin_scripts')
| -rw-r--r-- | tests/admin_scripts/tests.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py index d34f95ea40..3c4e01dfac 100644 --- a/tests/admin_scripts/tests.py +++ b/tests/admin_scripts/tests.py @@ -1495,6 +1495,13 @@ class CommandTypes(AdminScriptTestCase): args = ['check', '--help'] out, err = self.run_manage(args) self.assertNoOutput(err) + # Command-specific options like --tag appear before options common to + # all commands like --version. + tag_location = out.find('--tag') + version_location = out.find('--version') + self.assertNotEqual(tag_location, -1) + self.assertNotEqual(version_location, -1) + self.assertLess(tag_location, version_location) self.assertOutput(out, "Checks the entire Django project for potential problems.") def test_color_style(self): |
