diff options
author | Eli Collins <elic@assurancetechnologies.com> | 2020-10-03 15:13:19 -0400 |
---|---|---|
committer | Eli Collins <elic@assurancetechnologies.com> | 2020-10-03 15:13:19 -0400 |
commit | 3c75101e67549cd75e48a7079a1063da6245a631 (patch) | |
tree | 609e6bcfb61514f4686fc96fda74afbd0f8ae2ca | |
parent | 264847d3346a3b177498aa8f8acb63560b8e20c0 (diff) | |
download | passlib-3c75101e67549cd75e48a7079a1063da6245a631.tar.gz |
tests: fixed some minor UT errors
mainly a few minor test changes that were missed in prior commits
(rev 7273b2ca68f3, 2bf6312ecd77)
-rw-r--r-- | passlib/tests/test_handlers.py | 4 | ||||
-rw-r--r-- | passlib/tests/test_utils_pbkdf2.py | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/passlib/tests/test_handlers.py b/passlib/tests/test_handlers.py index 0f12506..27c7fd4 100644 --- a/passlib/tests/test_handlers.py +++ b/passlib/tests/test_handlers.py @@ -399,10 +399,10 @@ class hex_md5_test(HandlerCase): _set_mock_fips_mode() self.addCleanup(_set_mock_fips_mode, False) - # HACK: have to recreate hasher, since underlying digest is new. + # HACK: have to recreate hasher, since underlying HashInfo has changed. # could reload module and re-import, but this should be good enough. from passlib.handlers.digests import create_hex_hash - hasher = create_hex_hash("md5") + hasher = create_hex_hash("md5", required=False) self.assertFalse(hasher.supported) # can identify hashes even if disabled diff --git a/passlib/tests/test_utils_pbkdf2.py b/passlib/tests/test_utils_pbkdf2.py index 3b2bd09..443eb53 100644 --- a/passlib/tests/test_utils_pbkdf2.py +++ b/passlib/tests/test_utils_pbkdf2.py @@ -35,9 +35,10 @@ class UtilsTest(TestCase): ("md5", "md5", "SCRAM-MD5-PLUS", "MD-5"), ("sha1", "sha-1", "SCRAM-SHA-1", "SHA1"), ("sha256", "sha-256", "SHA_256", "sha2-256"), - ("ripemd", "ripemd", "SCRAM-RIPEMD", "RIPEMD"), - ("ripemd160", "ripemd-160", - "SCRAM-RIPEMD-160", "RIPEmd160"), + ("ripemd160", "ripemd-160", "SCRAM-RIPEMD-160", "RIPEmd160", + # NOTE: there was an older "RIPEMD" & "RIPEMD-128", but python treates "RIPEMD" + # as alias for "RIPEMD-160" + "ripemd", "SCRAM-RIPEMD"), ("test128", "test-128", "TEST128"), ("test2", "test2", "TEST-2"), ("test3_128", "test3-128", "TEST-3-128"), |