mirror of https://github.com/django/django.git
Removed redundant skip_checks option for call_command
This commit is contained in:
parent
6d11bb102d
commit
b8f2c972d0
|
@ -274,7 +274,6 @@ class CreatesuperuserManagementCommandTestCase(TestCase):
|
|||
email="joe@somewhere.org",
|
||||
date_of_birth="1976-04-01",
|
||||
stdout=new_io,
|
||||
skip_checks=True
|
||||
)
|
||||
command_output = new_io.getvalue().strip()
|
||||
self.assertEqual(command_output, 'Superuser created successfully.')
|
||||
|
@ -298,7 +297,6 @@ class CreatesuperuserManagementCommandTestCase(TestCase):
|
|||
username="joe@somewhere.org",
|
||||
stdout=new_io,
|
||||
stderr=new_io,
|
||||
skip_checks=True
|
||||
)
|
||||
|
||||
self.assertEqual(CustomUser._default_manager.count(), 0)
|
||||
|
@ -364,7 +362,6 @@ class CreatesuperuserManagementCommandTestCase(TestCase):
|
|||
email=email.email,
|
||||
group=group.pk,
|
||||
stdout=new_io,
|
||||
skip_checks=True,
|
||||
)
|
||||
command_output = new_io.getvalue().strip()
|
||||
self.assertEqual(command_output, 'Superuser created successfully.')
|
||||
|
@ -381,7 +378,6 @@ class CreatesuperuserManagementCommandTestCase(TestCase):
|
|||
username=email.pk,
|
||||
email=non_existent_email,
|
||||
stdout=new_io,
|
||||
skip_checks=True,
|
||||
)
|
||||
|
||||
@override_settings(AUTH_USER_MODEL='auth.CustomUserWithFK')
|
||||
|
@ -402,7 +398,6 @@ class CreatesuperuserManagementCommandTestCase(TestCase):
|
|||
interactive=True,
|
||||
stdout=new_io,
|
||||
stdin=MockTTY(),
|
||||
skip_checks=True,
|
||||
)
|
||||
|
||||
command_output = new_io.getvalue().strip()
|
||||
|
|
|
@ -351,8 +351,8 @@ class Command(BaseCommand):
|
|||
for app_label in app_labels:
|
||||
call_command(
|
||||
'loaddata', 'initial_data', verbosity=self.verbosity,
|
||||
database=connection.alias, skip_checks=True,
|
||||
app_label=app_label, hide_empty=True,
|
||||
database=connection.alias, app_label=app_label,
|
||||
hide_empty=True,
|
||||
)
|
||||
|
||||
return created_models
|
||||
|
|
|
@ -22,7 +22,7 @@ class Command(BaseCommand):
|
|||
|
||||
def handle(self, **options):
|
||||
warnings.warn("The syncdb command will be removed in Django 1.9", RemovedInDjango19Warning)
|
||||
call_command("migrate", skip_checks=True, **options)
|
||||
call_command("migrate", **options)
|
||||
|
||||
try:
|
||||
apps.get_model('auth', 'Permission')
|
||||
|
@ -41,5 +41,5 @@ class Command(BaseCommand):
|
|||
confirm = input('Please enter either "yes" or "no": ')
|
||||
continue
|
||||
if confirm == 'yes':
|
||||
call_command("createsuperuser", interactive=True, database=options['database'], skip_checks=True)
|
||||
call_command("createsuperuser", interactive=True, database=options['database'])
|
||||
break
|
||||
|
|
|
@ -830,7 +830,7 @@ class TransactionTestCase(SimpleTestCase):
|
|||
# We have to use this slightly awkward syntax due to the fact
|
||||
# that we're using *args and **kwargs together.
|
||||
call_command('loaddata', *self.fixtures,
|
||||
**{'verbosity': 0, 'database': db_name, 'skip_checks': True})
|
||||
**{'verbosity': 0, 'database': db_name})
|
||||
|
||||
def _post_teardown(self):
|
||||
"""Performs any post-test things. This includes:
|
||||
|
@ -864,8 +864,7 @@ class TransactionTestCase(SimpleTestCase):
|
|||
for db_name in self._databases_names(include_mirrors=False):
|
||||
# Flush the database
|
||||
call_command('flush', verbosity=0, interactive=False,
|
||||
database=db_name, skip_checks=True,
|
||||
reset_sequences=False,
|
||||
database=db_name, reset_sequences=False,
|
||||
allow_cascade=self.available_apps is not None,
|
||||
inhibit_post_migrate=self.available_apps is not None)
|
||||
|
||||
|
@ -931,7 +930,6 @@ class TestCase(TransactionTestCase):
|
|||
'verbosity': 0,
|
||||
'commit': False,
|
||||
'database': db_name,
|
||||
'skip_checks': True,
|
||||
})
|
||||
except Exception:
|
||||
self._fixture_teardown()
|
||||
|
|
Loading…
Reference in New Issue