From b8f2c972d0be8572727081c9c07ba18a3d446273 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Sun, 19 Oct 2014 21:25:09 +0200 Subject: [PATCH] Removed redundant skip_checks option for call_command --- django/contrib/auth/tests/test_management.py | 5 ----- django/core/management/commands/migrate.py | 4 ++-- django/core/management/commands/syncdb.py | 4 ++-- django/test/testcases.py | 6 ++---- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/django/contrib/auth/tests/test_management.py b/django/contrib/auth/tests/test_management.py index e10f22354fb..20f6c58f05b 100644 --- a/django/contrib/auth/tests/test_management.py +++ b/django/contrib/auth/tests/test_management.py @@ -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() diff --git a/django/core/management/commands/migrate.py b/django/core/management/commands/migrate.py index 8cc092af87f..536afb0bb41 100644 --- a/django/core/management/commands/migrate.py +++ b/django/core/management/commands/migrate.py @@ -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 diff --git a/django/core/management/commands/syncdb.py b/django/core/management/commands/syncdb.py index 27424aff549..b89ad62c3ec 100644 --- a/django/core/management/commands/syncdb.py +++ b/django/core/management/commands/syncdb.py @@ -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 diff --git a/django/test/testcases.py b/django/test/testcases.py index 58e316ac393..566c9395fb2 100644 --- a/django/test/testcases.py +++ b/django/test/testcases.py @@ -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()