diff options
Diffstat (limited to 'tests/migrations')
| -rw-r--r-- | tests/migrations/test_writer.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/migrations/test_writer.py b/tests/migrations/test_writer.py index 76fe5b5a9e..f921f9f03c 100644 --- a/tests/migrations/test_writer.py +++ b/tests/migrations/test_writer.py @@ -124,8 +124,8 @@ class WriterTests(TestCase): with override_settings(INSTALLED_APPS=test_apps): for app in test_apps: - app_cache.load_app(app) - migration = migrations.Migration('0001_initial', app.split('.')[-1]) - expected_path = os.path.join(base_dir, *(app.split('.') + ['migrations', '0001_initial.py'])) - writer = MigrationWriter(migration) - self.assertEqual(writer.path, expected_path) + with app_cache._with_app(app): + migration = migrations.Migration('0001_initial', app.split('.')[-1]) + expected_path = os.path.join(base_dir, *(app.split('.') + ['migrations', '0001_initial.py'])) + writer = MigrationWriter(migration) + self.assertEqual(writer.path, expected_path) |
