Skip to content

Commit 2b8d5f0

Browse files
committed
fix names
1 parent 2419aee commit 2b8d5f0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Lib/test/support/hashlib_helper.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,8 @@ def _block_openssl_hash_new(blocked_name):
560560
def _hashlib_new(name, data=b'', *, usedforsecurity=True, string=None):
561561
if name == blocked_name:
562562
raise _hashlib.UnsupportedDigestmodError(blocked_name)
563-
return wrapped(*args, **kwargs)
563+
return wrapped(name, data,
564+
usedforsecurity=usedforsecurity, string=string)
564565

565566
_ensure_wrapper_signature(_hashlib_new, wrapped)
566567
return unittest.mock.patch('_hashlib.new', _hashlib_new)
@@ -596,7 +597,7 @@ def _block_openssl_hmac_digest(blocked_name):
596597
def _hashlib_hmac_digest(key, msg, digest):
597598
if digest == blocked_name:
598599
raise _hashlib.UnsupportedDigestmodError(blocked_name)
599-
return wrapped(key, msg, digestmod)
600+
return wrapped(key, msg, digest)
600601

601602
_ensure_wrapper_signature(_hashlib_hmac_digest, wrapped)
602603
return unittest.mock.patch('_hashlib.hmac_digest', _hashlib_hmac_digest)

0 commit comments

Comments
 (0)