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

Refactored tests that rely on an ImportError for Python 3.5 compatibility

A change in Python test discovery [1] causes the old packages that raised
an error to be discovered; now we use a common directory that's
ignored during discovery. Refs #23763.

[1] http://bugs.python.org/issue7559
This commit is contained in:
Tim Graham
2015-02-03 18:02:59 -05:00
parent 65e005f8cd
commit c0cc8f69e7
6 changed files with 6 additions and 4 deletions

View File

@@ -159,7 +159,7 @@ class LoaderTests(TestCase):
migration_loader.get_migration_by_prefix("migrations", "blarg")
def test_load_import_error(self):
with override_settings(MIGRATION_MODULES={"migrations": "migrations.faulty_migrations.import_error"}):
with override_settings(MIGRATION_MODULES={"migrations": "import_error_package"}):
with self.assertRaises(ImportError):
MigrationLoader(connection)