mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #23067 -- Updated docs to use django-admin
This commit is contained in:
parent
66630f589c
commit
d47409831f
31 changed files with 187 additions and 198 deletions
|
@ -46,7 +46,7 @@ class BashCompletionTests(unittest.TestCase):
|
|||
|
||||
def test_django_admin_py(self):
|
||||
"django_admin.py will autocomplete option flags"
|
||||
self._user_input('django-admin.py sqlall --verb')
|
||||
self._user_input('django-admin sqlall --verb')
|
||||
output = self._run_autocomplete()
|
||||
self.assertEqual(output, ['--verbosity='])
|
||||
|
||||
|
@ -58,31 +58,31 @@ class BashCompletionTests(unittest.TestCase):
|
|||
|
||||
def test_custom_command(self):
|
||||
"A custom command can autocomplete option flags"
|
||||
self._user_input('django-admin.py test_command --l')
|
||||
self._user_input('django-admin test_command --l')
|
||||
output = self._run_autocomplete()
|
||||
self.assertEqual(output, ['--list'])
|
||||
|
||||
def test_subcommands(self):
|
||||
"Subcommands can be autocompleted"
|
||||
self._user_input('django-admin.py sql')
|
||||
self._user_input('django-admin sql')
|
||||
output = self._run_autocomplete()
|
||||
self.assertEqual(output, ['sql sqlall sqlclear sqlcustom sqldropindexes sqlflush sqlindexes sqlmigrate sqlsequencereset'])
|
||||
|
||||
def test_help(self):
|
||||
"No errors, just an empty list if there are no autocomplete options"
|
||||
self._user_input('django-admin.py help --')
|
||||
self._user_input('django-admin help --')
|
||||
output = self._run_autocomplete()
|
||||
self.assertEqual(output, [''])
|
||||
|
||||
def test_runfcgi(self):
|
||||
"Command arguments will be autocompleted"
|
||||
self._user_input('django-admin.py runfcgi h')
|
||||
self._user_input('django-admin runfcgi h')
|
||||
output = self._run_autocomplete()
|
||||
self.assertEqual(output, ['host='])
|
||||
|
||||
def test_app_completion(self):
|
||||
"Application names will be autocompleted for an AppCommand"
|
||||
self._user_input('django-admin.py sqlall a')
|
||||
self._user_input('django-admin sqlall a')
|
||||
output = self._run_autocomplete()
|
||||
a_labels = sorted(app_config.label
|
||||
for app_config in apps.get_app_configs()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue