summaryrefslogtreecommitdiff
path: root/passlib/tests/utils.py
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2012-04-17 21:58:54 -0400
committerEli Collins <elic@assurancetechnologies.com>2012-04-17 21:58:54 -0400
commit2ad8463a456796300df5340a2bc511e290e62072 (patch)
tree116a85776ae75ecde4c72c29b12c13d777b53c0f /passlib/tests/utils.py
parentceb7a00ddae502624d609bc63a9048f0de9f1b23 (diff)
downloadpasslib-2ad8463a456796300df5340a2bc511e290e62072.tar.gz
disabling saslprep() support under Jython - it lacks the stringprep module
Diffstat (limited to 'passlib/tests/utils.py')
-rw-r--r--passlib/tests/utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/passlib/tests/utils.py b/passlib/tests/utils.py
index eb8f3a7..ba439b7 100644
--- a/passlib/tests/utils.py
+++ b/passlib/tests/utils.py
@@ -505,6 +505,13 @@ class TestCase(unittest.TestCase):
msg = "error for case %r:" % (elem.render(1),)
self.assertEqual(result, correct, msg)
+ def require_stringprep(self):
+ "helper to skip test if stringprep is missing"
+ from passlib.utils import stringprep
+ if not stringprep:
+ from passlib.utils import _stringprep_missing_reason
+ raise self.skipTest("not available - stringprep module is " +
+ _stringprep_missing_reason)
#============================================================
#eoc
#============================================================