mirror of
https://github.com/django/django.git
synced 2025-11-25 05:04:26 +00:00
Refs #26421 -- Refactored Apps.lazy_model_operation() for better checks and tests
This commit is contained in:
parent
0eac5535f7
commit
2ff7ef15b0
9 changed files with 239 additions and 96 deletions
|
|
@ -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):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue