diff options
| author | Tim Graham <timograham@gmail.com> | 2016-12-07 17:42:31 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-07 17:42:31 -0500 |
| commit | b5f0b3478dfcf0335f8ac2038d59f54b4a05f2a0 (patch) | |
| tree | f3eb61bfdcf45c7b27fe3c480e9a7533746d1aad /tests/utils_tests/test_module_loading.py | |
| parent | f909fa84bedb51778a175aadfe4cfe7a91fe06cd (diff) | |
Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase.
Diffstat (limited to 'tests/utils_tests/test_module_loading.py')
| -rw-r--r-- | tests/utils_tests/test_module_loading.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/utils_tests/test_module_loading.py b/tests/utils_tests/test_module_loading.py index 738d3c7d04..2a524a2cf2 100644 --- a/tests/utils_tests/test_module_loading.py +++ b/tests/utils_tests/test_module_loading.py @@ -7,7 +7,6 @@ from zipimport import zipimporter from django.test import SimpleTestCase, TestCase, modify_settings from django.test.utils import extend_sys_path -from django.utils import six from django.utils._os import upath from django.utils.module_loading import ( autodiscover_modules, import_string, module_has_submodule, @@ -147,11 +146,11 @@ class AutodiscoverModulesTestCase(SimpleTestCase): autodiscover_modules('missing_module') def test_autodiscover_modules_found_but_bad_module(self): - with six.assertRaisesRegex(self, ImportError, "No module named '?a_package_name_that_does_not_exist'?"): + with self.assertRaisesRegex(ImportError, "No module named '?a_package_name_that_does_not_exist'?"): autodiscover_modules('bad_module') def test_autodiscover_modules_several_one_bad_module(self): - with six.assertRaisesRegex(self, ImportError, "No module named '?a_package_name_that_does_not_exist'?"): + with self.assertRaisesRegex(ImportError, "No module named '?a_package_name_that_does_not_exist'?"): autodiscover_modules('good_module', 'bad_module') def test_autodiscover_modules_several_found(self): |
