summaryrefslogtreecommitdiff
path: root/tests/user_commands/tests.py
diff options
context:
space:
mode:
authorRyan P Kilby <rpkilby@ncsu.edu>2018-05-08 14:50:35 -0400
committerTim Graham <timograham@gmail.com>2018-05-14 22:18:22 -0400
commit2dcc5d629a6439b5547cdd6e67815cabf608fcd4 (patch)
tree888271928a4a7d53dbcbe956d96dd1de4a35ea2e /tests/user_commands/tests.py
parent265506bbc347a6b3fcc6c66ab1a2417b3b7ea57a (diff)
Fixed #29392 -- Disallowed use of abbreviated forms of --settings and --pythonpath management command options.
Diffstat (limited to 'tests/user_commands/tests.py')
-rw-r--r--tests/user_commands/tests.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/user_commands/tests.py b/tests/user_commands/tests.py
index b5d29721b4..92263f58d6 100644
--- a/tests/user_commands/tests.py
+++ b/tests/user_commands/tests.py
@@ -232,6 +232,16 @@ class CommandRunTests(AdminScriptTestCase):
self.assertNoOutput(err)
self.assertEqual(out.strip(), '/PREFIX/some/url/')
+ def test_disallowed_abbreviated_options(self):
+ """
+ To avoid conflicts with custom options, commands don't allow
+ abbreviated forms of the --setting and --pythonpath options.
+ """
+ self.write_settings('settings.py', apps=['user_commands'])
+ out, err = self.run_manage(['set_option', '--set', 'foo'])
+ self.assertNoOutput(err)
+ self.assertEqual(out.strip(), 'Set foo')
+
class UtilsTests(SimpleTestCase):