diff options
author | Eli Collins <elic@assurancetechnologies.com> | 2012-03-11 18:40:35 -0400 |
---|---|---|
committer | Eli Collins <elic@assurancetechnologies.com> | 2012-03-11 18:40:35 -0400 |
commit | b970d6ee145122005f1e6808466900a94e00dfcc (patch) | |
tree | 6e77a5d3698e90691c084203932716dd8b0deb79 /passlib/tests/test_context.py | |
parent | bacfd1448703a106d1ed45e787a03ad671ad5c6c (diff) | |
download | passlib-b970d6ee145122005f1e6808466900a94e00dfcc.tar.gz |
misc bugfixes dealing with changes from last 8 or so commits
Diffstat (limited to 'passlib/tests/test_context.py')
-rw-r--r-- | passlib/tests/test_context.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/passlib/tests/test_context.py b/passlib/tests/test_context.py index efeaaeb..46cd3f5 100644 --- a/passlib/tests/test_context.py +++ b/passlib/tests/test_context.py @@ -209,7 +209,12 @@ admin__context__deprecated = des_crypt, bsdi_crypt ) #check nameless handler rejected - self.assertRaises(ValueError, CryptPolicy, schemes=[uh.StaticHandler]) + class nameless(uh.StaticHandler): + name = None + self.assertRaises(ValueError, CryptPolicy, schemes=[nameless]) + + # check scheme must be name or crypt handler + self.assertRaises(TypeError, CryptPolicy, schemes=[uh.StaticHandler]) #check name conflicts are rejected class dummy_1(uh.StaticHandler): @@ -941,7 +946,7 @@ class CryptContextTest(TestCase): return True def _calc_checksum(self, secret): - time.sleep(cls.delay) + time.sleep(self.delay) return to_unicode(secret + 'x') # silence deprecation warnings for min verify time |