mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Partially reverted refs #27054 except for one of the tests as this solution supersedes that one. Thanks Shai Berger for the review.
This commit is contained in:
@@ -4,12 +4,11 @@ from unittest import skipIf
|
||||
|
||||
from django.db import connection, connections
|
||||
from django.db.migrations.exceptions import (
|
||||
AmbiguityError, InconsistentMigrationHistory, MigrationSchemaMissing,
|
||||
NodeNotFoundError,
|
||||
AmbiguityError, InconsistentMigrationHistory, NodeNotFoundError,
|
||||
)
|
||||
from django.db.migrations.loader import MigrationLoader
|
||||
from django.db.migrations.recorder import MigrationRecorder
|
||||
from django.test import TestCase, mock, modify_settings, override_settings
|
||||
from django.test import TestCase, modify_settings, override_settings
|
||||
from django.utils import six
|
||||
|
||||
|
||||
@@ -484,12 +483,3 @@ class LoaderTests(TestCase):
|
||||
('app1', '4_auto'),
|
||||
}
|
||||
self.assertEqual(plan, expected_plan)
|
||||
|
||||
def test_readonly_database(self):
|
||||
"""
|
||||
check_consistent_history() ignores read-only databases, possibly
|
||||
without a django_migrations table.
|
||||
"""
|
||||
with mock.patch.object(MigrationRecorder, 'ensure_schema', side_effect=MigrationSchemaMissing()):
|
||||
loader = MigrationLoader(connection=None)
|
||||
loader.check_consistent_history(connection)
|
||||
|
||||
Reference in New Issue
Block a user