summaryrefslogtreecommitdiff
path: root/Lib/test/test_hashlib.py
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-02-22 09:21:49 +0000
committerMartin Panter <vadmium+py@gmail.com>2016-02-22 09:21:49 +0000
commitdb4ef0d8b7e256976cd1d6d5147c78aa7fecf6d4 (patch)
tree4fd972a9d89b40b4da7f7d7a3b99b1516819382f /Lib/test/test_hashlib.py
parent954889890bb9ddd6666faaa56cfe122ec3024274 (diff)
downloadcpython-db4ef0d8b7e256976cd1d6d5147c78aa7fecf6d4.tar.gz
Issue #26390: Fix and test pbkdf2_hmac() parameter names
Based on patch by Daan Bakker.
Diffstat (limited to 'Lib/test/test_hashlib.py')
-rw-r--r--Lib/test/test_hashlib.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_hashlib.py b/Lib/test/test_hashlib.py
index 85ec2f96db..8a297dd45e 100644
--- a/Lib/test/test_hashlib.py
+++ b/Lib/test/test_hashlib.py
@@ -513,6 +513,9 @@ class KDFTests(unittest.TestCase):
self.assertRaises(ValueError, pbkdf2, 'sha1', b'pass', b'salt', 1, -1)
with self.assertRaisesRegex(ValueError, 'unsupported hash type'):
pbkdf2('unknown', b'pass', b'salt', 1)
+ out = pbkdf2(hash_name='sha1', password=b'password', salt=b'salt',
+ iterations=1, dklen=None)
+ self.assertEqual(out, self.pbkdf2_results['sha1'][0][0])
def test_pbkdf2_hmac_py(self):
self._test_pbkdf2_hmac(py_hashlib.pbkdf2_hmac)