summaryrefslogtreecommitdiff
path: root/tests/admin_scripts
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2014-06-14 18:12:43 +0200
committerClaude Paroz <claude@2xlibre.net>2014-06-14 18:53:33 +0200
commit5949c2118d7cc7cffe86cd9db1820b186b88bfc0 (patch)
treeac8ce95ec3b35da70506328dd64b0d25dd2aed8d /tests/admin_scripts
parent2ca5fc55b0a0b18ce4f060ee999ef355b5ceb0a3 (diff)
Restored command error behavior when called from command line
Refs #19973.
Diffstat (limited to 'tests/admin_scripts')
-rw-r--r--tests/admin_scripts/tests.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py
index 48414272ac..b8fea1d0d3 100644
--- a/tests/admin_scripts/tests.py
+++ b/tests/admin_scripts/tests.py
@@ -1494,7 +1494,7 @@ class CommandTypes(AdminScriptTestCase):
"NoArg Commands raise an error if an argument is provided"
args = ['noargs_command', 'argument']
out, err = self.run_manage(args)
- self.assertOutput(err, "Error: unrecognized arguments: argument")
+ self.assertOutput(err, "error: unrecognized arguments: argument")
def test_app_command(self):
"User AppCommands can execute when a single app name is provided"
@@ -1508,7 +1508,7 @@ class CommandTypes(AdminScriptTestCase):
"User AppCommands raise an error when no app name is provided"
args = ['app_command']
out, err = self.run_manage(args)
- self.assertOutput(err, 'Error: Enter at least one application label.')
+ self.assertOutput(err, 'error: Enter at least one application label.')
def test_app_command_multiple_apps(self):
"User AppCommands raise an error when multiple app names are provided"
@@ -1642,9 +1642,10 @@ class StartProject(LiveServerTestCase, AdminScriptTestCase):
]
def test_wrong_args(self):
- "Make sure passing the wrong kinds of arguments raises a CommandError"
+ "Make sure passing the wrong kinds of arguments outputs an error and prints usage"
out, err = self.run_django_admin(['startproject'])
self.assertNoOutput(out)
+ self.assertOutput(err, "usage:")
self.assertOutput(err, "You must provide a project name.")
def test_simple_project(self):