diff options
author | Eli Collins <elic@assurancetechnologies.com> | 2012-04-17 21:58:54 -0400 |
---|---|---|
committer | Eli Collins <elic@assurancetechnologies.com> | 2012-04-17 21:58:54 -0400 |
commit | 2ad8463a456796300df5340a2bc511e290e62072 (patch) | |
tree | 116a85776ae75ecde4c72c29b12c13d777b53c0f /passlib/tests/utils.py | |
parent | ceb7a00ddae502624d609bc63a9048f0de9f1b23 (diff) | |
download | passlib-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.py | 7 |
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 #============================================================ |