1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #21014 -- Fixed gobbled ImportError in MigrationLoader.

This commit is contained in:
Loic Bistuer
2013-09-06 03:51:11 +07:00
committed by Tim Graham
parent 4d13cc56de
commit 82bbb9fe81
3 changed files with 9 additions and 0 deletions

View File

@@ -77,3 +77,10 @@ class LoaderTests(TestCase):
migration_loader.get_migration_by_prefix("migrations", "0")
with self.assertRaises(KeyError):
migration_loader.get_migration_by_prefix("migrations", "blarg")
def test_load_import_error(self):
migration_loader = MigrationLoader(connection)
with override_settings(MIGRATION_MODULES={"migrations": "migrations.faulty_migrations.import_error"}):
with self.assertRaises(ImportError):
migration_loader.load_disk()