diff options
Diffstat (limited to 'tests/utils_tests/test_module_loading.py')
| -rw-r--r-- | tests/utils_tests/test_module_loading.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/utils_tests/test_module_loading.py b/tests/utils_tests/test_module_loading.py index 2eb01ad770..48ba9c15ff 100644 --- a/tests/utils_tests/test_module_loading.py +++ b/tests/utils_tests/test_module_loading.py @@ -10,6 +10,7 @@ from django.core.exceptions import ImproperlyConfigured from django.test import SimpleTestCase, modify_settings from django.test.utils import IgnorePendingDeprecationWarningsMixin, extend_sys_path from django.utils import six +from django.utils.deprecation import RemovedInDjango19Warning from django.utils.module_loading import (autodiscover_modules, import_by_path, import_string, module_has_submodule) from django.utils._os import upath @@ -134,11 +135,11 @@ class ModuleImportTestCase(IgnorePendingDeprecationWarningsMixin, unittest.TestC def test_import_by_path_pending_deprecation_warning(self): with warnings.catch_warnings(record=True) as w: - warnings.simplefilter('always', category=PendingDeprecationWarning) + warnings.simplefilter('always', category=RemovedInDjango19Warning) cls = import_by_path('django.utils.module_loading.import_by_path') self.assertEqual(cls, import_by_path) self.assertEqual(len(w), 1) - self.assertTrue(issubclass(w[-1].category, PendingDeprecationWarning)) + self.assertTrue(issubclass(w[-1].category, RemovedInDjango19Warning)) self.assertIn('deprecated', str(w[-1].message)) def test_import_string(self): |
