mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #31318 -- Allowed sqlmigrate to inspect squashed migrations.
This commit is contained in:
committed by
Mariusz Felisiak
parent
271e108b29
commit
d88365708c
@@ -713,6 +713,14 @@ class MigrateTests(MigrationTestBase):
|
||||
self.assertIn('-- create model book', output)
|
||||
self.assertNotIn('-- create model tribble', output)
|
||||
|
||||
@override_settings(MIGRATION_MODULES={'migrations': 'migrations.test_migrations_squashed'})
|
||||
def test_sqlmigrate_replaced_migration(self):
|
||||
out = io.StringIO()
|
||||
call_command('sqlmigrate', 'migrations', '0001_initial', stdout=out)
|
||||
output = out.getvalue().lower()
|
||||
self.assertIn('-- create model author', output)
|
||||
self.assertIn('-- create model tribble', output)
|
||||
|
||||
@override_settings(MIGRATION_MODULES={'migrations': 'migrations.test_migrations_no_operations'})
|
||||
def test_migrations_no_operations(self):
|
||||
err = io.StringIO()
|
||||
|
||||
Reference in New Issue
Block a user