mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #31318 -- Allowed sqlmigrate to inspect squashed migrations.
This commit is contained in:
parent
271e108b29
commit
d88365708c
3 changed files with 37 additions and 21 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue