summaryrefslogtreecommitdiff
path: root/passlib/tests/utils.py
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2011-03-22 19:33:10 -0400
committerEli Collins <elic@assurancetechnologies.com>2011-03-22 19:33:10 -0400
commit58a8f6b2e93d22e8acb9bef5e1640a1e945bc1e5 (patch)
treeca4d536e10e7a24466e171d91a0fb66d6827754a /passlib/tests/utils.py
parentde2622bd4f6477983d09a001000f0e30856065d3 (diff)
downloadpasslib-58a8f6b2e93d22e8acb9bef5e1640a1e945bc1e5.tar.gz
big rename: changed base handler class names
============================================ renamed the classes in passlib.utils.handlers, for clarity in code: * BaseHash -> SimpleHandler * ExtHash -> ExtendedHandler * BackendExtHash -> MultiBackendHandler
Diffstat (limited to 'passlib/tests/utils.py')
-rw-r--r--passlib/tests/utils.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/passlib/tests/utils.py b/passlib/tests/utils.py
index 6b4bd0e..e7b59e1 100644
--- a/passlib/tests/utils.py
+++ b/passlib/tests/utils.py
@@ -25,7 +25,7 @@ except ImportError:
from nose.plugins.skip import SkipTest
#pkg
from passlib.utils import classproperty
-from passlib.utils.handlers import BaseHash, ExtHash, BackendExtHash
+from passlib.utils.handlers import SimpleHandler, ExtendedHandler, MultiBackendHandler
#local
__all__ = [
#util funcs
@@ -203,7 +203,7 @@ class TestCase(unittest.TestCase):
#other unittest helpers
#=========================================================
class HandlerCase(TestCase):
- """base class for testing password hash handlers (esp passlib.utils.handlers.BaseHash subclasses)
+ """base class for testing password hash handlers (esp passlib.utils.handlers.SimpleHandler subclasses)
.. todo::
write directions on how to use this class.
@@ -342,9 +342,9 @@ class HandlerCase(TestCase):
#TODO: check optional rounds attributes & salt attributes
def test_04_base_handler(self):
- "check configuration of BaseHash-derived classes"
+ "check configuration of SimpleHandler-derived classes"
cls = self.handler
- if not isinstance(cls, type) or not issubclass(cls, BaseHash):
+ if not isinstance(cls, type) or not issubclass(cls, SimpleHandler):
raise SkipTest
if not cls.name:
@@ -354,9 +354,9 @@ class HandlerCase(TestCase):
raise AssertionError, "class must have .setting_kwds attribute set"
def test_05_ext_handler(self):
- "check configuration of ExtHash-derived classes"
+ "check configuration of ExtendedHandler-derived classes"
cls = self.handler
- if not isinstance(cls, type) or not issubclass(cls, ExtHash):
+ if not isinstance(cls, type) or not issubclass(cls, ExtendedHandler):
raise SkipTest
if any(k not in cls.setting_kwds for k in cls._extra_init_settings):
@@ -393,7 +393,7 @@ class HandlerCase(TestCase):
raise AssertionError, "unknown rounds cost function"
def test_06_backend_handler(self):
- "check configuration of BackendExtHash-derived classes"
+ "check configuration of MultiBackendHandler-derived classes"
h = self.handler
if not hasattr(h, "get_backend"):
raise SkipTest
@@ -674,7 +674,7 @@ class HandlerCase(TestCase):
#=========================================================
def enable_backend_case(handler, name):
"helper to check if a separate test is needed for the specified backend"
- assert issubclass(handler, BackendExtHash), "handler must derived from BackendExtHash"
+ assert issubclass(handler, MultiBackendHandler), "handler must derived from MultiBackendHandler"
assert name in handler.backends, "unknown backend: %r" % (name,)
return enable_option("all-backends") and handler.get_backend() != name and handler.has_backend(name)