diff options
Diffstat (limited to 'passlib/tests/test_ext_django_source.py')
-rw-r--r-- | passlib/tests/test_ext_django_source.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/passlib/tests/test_ext_django_source.py b/passlib/tests/test_ext_django_source.py index 4b42e59..a6da6b6 100644 --- a/passlib/tests/test_ext_django_source.py +++ b/passlib/tests/test_ext_django_source.py @@ -4,12 +4,10 @@ test passlib.ext.django against django source tests #============================================================================= # imports #============================================================================= -from __future__ import absolute_import, division, print_function # core import logging; log = logging.getLogger(__name__) # site # pkg -from passlib.utils.compat import suppress_cause from passlib.ext.django.utils import DJANGO_VERSION, DjangoTranslator, _PasslibHasherWrapper # tests from passlib.tests.utils import TestCase, TEST_MODE @@ -60,10 +58,8 @@ elif has_min_django: try: from auth_tests import test_hashers as test_hashers_mod except ImportError as err: - raise suppress_cause( - EnvironmentError("error trying to import django tests " - "from source path (%r): %r" % - (source_path, err))) + raise EnvironmentError("error trying to import django tests " + "from source path (%r): %r" % (source_path, err)) from None finally: sys.path.remove(tests_path) @@ -89,7 +85,6 @@ if test_hashers_mod: from django.core.signals import setting_changed from django.dispatch import receiver from django.utils.module_loading import import_string - from passlib.utils.compat import get_unbound_method_function class HashersTest(test_hashers_mod.TestUtilsHashPass, _ExtensionSupport): """ @@ -102,7 +97,7 @@ if test_hashers_mod: #================================================================== # port patchAttr() helper method from passlib.tests.utils.TestCase - patchAttr = get_unbound_method_function(TestCase.patchAttr) + patchAttr = TestCase.patchAttr #================================================================== # custom setup @@ -212,7 +207,7 @@ if test_hashers_mod: def tearDown(self): # NOTE: could rely on addCleanup() instead, but need py26 compat self.unload_extension() - super(HashersTest, self).tearDown() + super().tearDown() #================================================================== # skip a few methods that can't be replicated properly |