1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #29392 -- Disallowed use of abbreviated forms of --settings and --pythonpath management command options.

This commit is contained in:
Ryan P Kilby
2018-05-08 14:50:35 -04:00
committed by Tim Graham
parent 265506bbc3
commit 2dcc5d629a
4 changed files with 24 additions and 1 deletions

View File

@@ -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):