mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Reverted "Fixed #25388 -- Added an option to allow disabling of migrations during test database creation"
This reverts commit 157d7f1f1d since it
disables migrations all the time, not just during tests.
This commit is contained in:
@@ -2,7 +2,7 @@ from __future__ import unicode_literals
|
||||
|
||||
from unittest import skipIf
|
||||
|
||||
from django.db import ConnectionHandler, connection, connections
|
||||
from django.db import connection, connections
|
||||
from django.db.migrations.exceptions import (
|
||||
AmbiguityError, InconsistentMigrationHistory, NodeNotFoundError,
|
||||
)
|
||||
@@ -204,23 +204,6 @@ class LoaderTests(TestCase):
|
||||
self.assertEqual(migration_loader.migrated_apps, set())
|
||||
self.assertEqual(migration_loader.unmigrated_apps, {'migrated_app'})
|
||||
|
||||
@override_settings(
|
||||
INSTALLED_APPS=['migrations.migrations_test_apps.migrated_app'],
|
||||
)
|
||||
def test_disable_migrations(self):
|
||||
connections = ConnectionHandler({
|
||||
'default': {
|
||||
'NAME': ':memory:',
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'TEST': {
|
||||
'MIGRATE': False,
|
||||
},
|
||||
},
|
||||
})
|
||||
migration_loader = MigrationLoader(connections['default'])
|
||||
self.assertEqual(migration_loader.migrated_apps, set())
|
||||
self.assertEqual(migration_loader.unmigrated_apps, {'migrated_app'})
|
||||
|
||||
@override_settings(MIGRATION_MODULES={"migrations": "migrations.test_migrations_squashed"})
|
||||
def test_loading_squashed(self):
|
||||
"Tests loading a squashed migration"
|
||||
|
||||
Reference in New Issue
Block a user