diff options
| author | Claude Paroz <claude@2xlibre.net> | 2014-06-14 20:01:02 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2014-06-14 20:01:02 +0200 |
| commit | c24e979ece2729716593291d3ebd81fdf7fc3b7d (patch) | |
| tree | fb3adf9d150212cc911625729fd6912c3c67ee9c /tests/admin_scripts | |
| parent | 5949c2118d7cc7cffe86cd9db1820b186b88bfc0 (diff) | |
Fixed #7762 -- Hidden full script name in command error output
Diffstat (limited to 'tests/admin_scripts')
| -rw-r--r-- | tests/admin_scripts/tests.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py index b8fea1d0d3..ec7f47ac36 100644 --- a/tests/admin_scripts/tests.py +++ b/tests/admin_scripts/tests.py @@ -1417,6 +1417,14 @@ class CommandTypes(AdminScriptTestCase): expected_labels = "('testlabel',)" self._test_base_command(args, expected_labels, option_a="'x'", option_b="'y'") + def test_base_command_with_wrong_option(self): + "User BaseCommands outputs command usage when wrong option is specified" + args = ['base_command', '--invalid'] + out, err = self.run_manage(args) + self.assertNoOutput(out) + self.assertOutput(err, "usage: manage.py base_command") + self.assertOutput(err, "error: unrecognized arguments: --invalid") + def _test_base_command(self, args, labels, option_a="'1'", option_b="'2'"): out, err = self.run_manage(args) |
