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:
@@ -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):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user