mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Refs #26421 -- Refactored Apps.lazy_model_operation() for better checks and tests
This commit is contained in:
@@ -449,6 +449,12 @@ class MigrateTests(MigrationTestBase):
|
||||
"""
|
||||
call_command("migrate", "migrated_unapplied_app", stdout=six.StringIO())
|
||||
|
||||
# unmigrated_app.SillyModel has a foreign key to 'migrations.Tribble',
|
||||
# but that model is only defined in a migration, so the global app
|
||||
# registry never sees it and the reference is left dangling. Remove it
|
||||
# to avoid problems in subsequent tests.
|
||||
del apps._pending_operations[('migrations', 'tribble')]
|
||||
|
||||
@override_settings(MIGRATION_MODULES={"migrations": "migrations.test_migrations_squashed"})
|
||||
def test_migrate_record_replaced(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user