Makes sure the loader uses Migration.run_before.
(self)
| 167 | MIGRATION_MODULES={"migrations": "migrations.test_migrations_run_before"} |
| 168 | ) |
| 169 | def test_run_before(self): |
| 170 | """ |
| 171 | Makes sure the loader uses Migration.run_before. |
| 172 | """ |
| 173 | # Load and test the plan |
| 174 | migration_loader = MigrationLoader(connection) |
| 175 | self.assertEqual( |
| 176 | migration_loader.graph.forwards_plan(("migrations", "0002_second")), |
| 177 | [ |
| 178 | ("migrations", "0001_initial"), |
| 179 | ("migrations", "0003_third"), |
| 180 | ("migrations", "0002_second"), |
| 181 | ], |
| 182 | ) |
| 183 | |
| 184 | @override_settings( |
| 185 | MIGRATION_MODULES={ |
nothing calls this directly
no test coverage detected