Commit 75bbcfa3 authored by Tim Graham's avatar Tim Graham
Browse files

Replaced sqlall in some bash_completion/admin_scripts tests.

sqlall will be removed in Django 1.9, so now's a good time to remove
its usage where it's not important.
parent 0821b3d5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ def call_command(name, *args, **options):
    Some examples:
        call_command('syncdb')
        call_command('shell', plain=True)
        call_command('sqlall', 'myapp')
        call_command('sqlmigrate', 'myapp')
    """
    # Load the command object.
    try:
@@ -240,7 +240,7 @@ class ManagementUtility(object):
                options.extend((k, 1) for k in FASTCGI_OPTIONS)
            # special case: add the names of installed apps to options
            elif cwords[0] in ('dumpdata', 'sql', 'sqlall', 'sqlclear',
                    'sqlcustom', 'sqlindexes', 'sqlsequencereset', 'test'):
                    'sqlcustom', 'sqlindexes', 'sqlmigrate', 'sqlsequencereset', 'test'):
                try:
                    app_configs = apps.get_app_configs()
                    # Get the last part of the dotted path as the app name.
+85 −89

File changed.

Preview size limit exceeded, changes collapsed.

+3 −3
Original line number Diff line number Diff line
@@ -58,13 +58,13 @@ class BashCompletionTests(unittest.TestCase):

    def test_django_admin_py(self):
        "django_admin.py will autocomplete option flags"
        self._user_input('django-admin sqlall --verb')
        self._user_input('django-admin sqlmigrate --verb')
        output = self._run_autocomplete()
        self.assertEqual(output, ['--verbosity='])

    def test_manage_py(self):
        "manage.py will autocomplete option flags"
        self._user_input('manage.py sqlall --verb')
        self._user_input('manage.py sqlmigrate --verb')
        output = self._run_autocomplete()
        self.assertEqual(output, ['--verbosity='])

@@ -101,7 +101,7 @@ class BashCompletionTests(unittest.TestCase):

    def test_app_completion(self):
        "Application names will be autocompleted for an AppCommand"
        self._user_input('django-admin sqlall a')
        self._user_input('django-admin sqlmigrate a')
        output = self._run_autocomplete()
        a_labels = sorted(app_config.label
            for app_config in apps.get_app_configs()