summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2011-02-12 23:40:41 -0500
committerEli Collins <elic@assurancetechnologies.com>2011-02-12 23:40:41 -0500
commitc2a7dfe0a7b4b2511942e3619a30c328c39c873a (patch)
treecba619f0dbb04c747f1b0b6f448ca950f1e92543
parent15ce3c6998568c4c66b8962619700b2b9259d264 (diff)
downloadpasslib-c2a7dfe0a7b4b2511942e3619a30c328c39c873a.tar.gz
added UT call to check BaseHandler.validate_class()
-rw-r--r--passlib/tests/handler_utils.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/passlib/tests/handler_utils.py b/passlib/tests/handler_utils.py
index 84a754d..fc345a5 100644
--- a/passlib/tests/handler_utils.py
+++ b/passlib/tests/handler_utils.py
@@ -8,6 +8,7 @@ import re
from nose.plugins.skip import SkipTest
#pkg
from passlib.tests.utils import TestCase
+from passlib.utils.handlers import BaseHandler, PlainHandler
#module
__all__ = [
"_HandlerTestCase"
@@ -119,6 +120,13 @@ class _HandlerTestCase(TestCase):
self.assert_(name.lower() == name, "name not lower-case:")
self.assert_(re.match("^[a-z0-9_]+$", name), "name must be alphanum + underscore: %r" % (name,))
+ def test_01_base_handler(self):
+ "run BaseHandler validation tests"
+ h = self.handler
+ if not isinstance(h, type) or not issubclass(h, (BaseHandler, PlainHandler)):
+ raise SkipTest
+ h.validate_class() #should raise AssertionError if something's wrong.
+
#=========================================================
#identify
#=========================================================