mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed ImportError message in utils.module_loading.import_string()
This commit is contained in:
committed by
Tim Graham
parent
e5033dcbba
commit
c2b4967e76
@@ -115,7 +115,9 @@ class ModuleImportTestCase(unittest.TestCase):
|
||||
|
||||
# Test exceptions raised
|
||||
self.assertRaises(ImportError, import_string, 'no_dots_in_path')
|
||||
self.assertRaises(ImportError, import_string, 'utils_tests.unexistent')
|
||||
msg = 'Module "utils_tests" does not define a "unexistent" attribute'
|
||||
with six.assertRaisesRegex(self, ImportError, msg):
|
||||
import_string('utils_tests.unexistent')
|
||||
|
||||
|
||||
@modify_settings(INSTALLED_APPS={'append': 'utils_tests.test_module'})
|
||||
|
||||
Reference in New Issue
Block a user