summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2014-10-19 21:19:30 +0200
committerClaude Paroz <claude@2xlibre.net>2014-10-20 17:26:00 +0200
commit6d11bb102dd6876a936297c1ee8cddbaca22eee3 (patch)
treeba58a070cc661b11a7f25f1e676029cc370432ca
parent685edab9da89b54e3e0e7bbc1c9f8b33d3f45969 (diff)
Revert "Fixed #23650 -- Prevented migrate from calling checks 3 times"
This reverts commit 8d6e1afe0be0570253a508f43e2ef89ae640984e. call_command now always set skip_checks to True (tested in user_commands).
-rw-r--r--django/core/management/commands/migrate.py1
-rw-r--r--tests/migrations/test_commands.py21
2 files changed, 0 insertions, 22 deletions
diff --git a/django/core/management/commands/migrate.py b/django/core/management/commands/migrate.py
index 717cc7213f..8cc092af87 100644
--- a/django/core/management/commands/migrate.py
+++ b/django/core/management/commands/migrate.py
@@ -165,7 +165,6 @@ class Command(BaseCommand):
database=db,
reset_sequences=False,
inhibit_post_migrate=True,
- skip_checks=True,
)
# Migrate!
diff --git a/tests/migrations/test_commands.py b/tests/migrations/test_commands.py
index 5baa508d50..798dd86fe5 100644
--- a/tests/migrations/test_commands.py
+++ b/tests/migrations/test_commands.py
@@ -139,27 +139,6 @@ class MigrateTests(MigrationTestBase):
stdout = six.StringIO()
call_command("migrate", "migrated_unapplied_app", stdout=stdout)
- @override_system_checks([])
- @override_settings(MIGRATION_MODULES={"migrations": "migrations.test_migrations"})
- def test_migrate_system_checks(self):
- """
- Migrate should only call system checks once, even with test_flush=True (Refs #23650).
- """
- from django.core.management.base import BaseCommand
-
- self.counter = 0
-
- def patched_check(self_, **kwargs):
- self.counter = self.counter + 1
-
- saved_check = BaseCommand.check
- BaseCommand.check = patched_check
- try:
- call_command("migrate", "migrations", verbosity=0, test_flush=True)
- finally:
- BaseCommand.check = saved_check
- self.assertEqual(self.counter, 1)
-
class MakeMigrationsTests(MigrationTestBase):
"""