(self)
| 1035 | self.assertIn("Migration", result) |
| 1036 | |
| 1037 | def test_migration_path(self): |
| 1038 | test_apps = [ |
| 1039 | "migrations.migrations_test_apps.normal", |
| 1040 | "migrations.migrations_test_apps.with_package_model", |
| 1041 | "migrations.migrations_test_apps.without_init_file", |
| 1042 | ] |
| 1043 | |
| 1044 | base_dir = os.path.dirname(os.path.dirname(__file__)) |
| 1045 | |
| 1046 | for app in test_apps: |
| 1047 | with self.modify_settings(INSTALLED_APPS={"append": app}): |
| 1048 | migration = migrations.Migration("0001_initial", app.split(".")[-1]) |
| 1049 | expected_path = os.path.join( |
| 1050 | base_dir, *(app.split(".") + ["migrations", "0001_initial.py"]) |
| 1051 | ) |
| 1052 | writer = MigrationWriter(migration) |
| 1053 | self.assertEqual(writer.path, expected_path) |
| 1054 | |
| 1055 | @override_settings( |
| 1056 | MIGRATION_MODULES={"namespace_app": "namespace_app.migrations"}, |
nothing calls this directly
no test coverage detected