Fixed test isolation in a couple migrations tests.
Without this, tests from refs #27432 fail when running with --reverse.
This commit is contained in:
parent
d27643354e
commit
9932e1bf52
|
@ -512,6 +512,9 @@ class ExecutorTests(MigrationTestBase):
|
||||||
('mutate_state_a', None),
|
('mutate_state_a', None),
|
||||||
])
|
])
|
||||||
self.assertIn('added', dict(state.models['mutate_state_b', 'b'].fields))
|
self.assertIn('added', dict(state.models['mutate_state_b', 'b'].fields))
|
||||||
|
executor.migrate([
|
||||||
|
('mutate_state_b', None),
|
||||||
|
])
|
||||||
|
|
||||||
@override_settings(MIGRATION_MODULES={"migrations": "migrations.test_migrations"})
|
@override_settings(MIGRATION_MODULES={"migrations": "migrations.test_migrations"})
|
||||||
def test_process_callback(self):
|
def test_process_callback(self):
|
||||||
|
@ -592,6 +595,7 @@ class ExecutorTests(MigrationTestBase):
|
||||||
editor.execute(editor.sql_delete_table % {"table": "author_app_author"})
|
editor.execute(editor.sql_delete_table % {"table": "author_app_author"})
|
||||||
self.assertTableNotExists("author_app_author")
|
self.assertTableNotExists("author_app_author")
|
||||||
self.assertTableNotExists("book_app_book")
|
self.assertTableNotExists("book_app_book")
|
||||||
|
executor.migrate([("author_app", None)], fake=True)
|
||||||
|
|
||||||
@override_settings(MIGRATION_MODULES={"migrations": "migrations.test_migrations_squashed"})
|
@override_settings(MIGRATION_MODULES={"migrations": "migrations.test_migrations_squashed"})
|
||||||
def test_apply_all_replaced_marks_replacement_as_applied(self):
|
def test_apply_all_replaced_marks_replacement_as_applied(self):
|
||||||
|
|
Loading…
Reference in New Issue