MCPcopy Index your code
hub / github.com/python/cpython / assert_hmac_common_cases

Method assert_hmac_common_cases

Lib/test/test_hmac.py:366–374  ·  view source on GitHub ↗

Common tests executed by all subclasses.

(
        self, key, msg, hexdigest, digestmod, hashname, digest_size, block_size
    )

Source from the content-addressed store, hash-verified

364 return d
365
366 def assert_hmac_common_cases(
367 self, key, msg, hexdigest, digestmod, hashname, digest_size, block_size
368 ):
369 """Common tests executed by all subclasses."""
370 h1 = self.hmac_new_by_name(key, hashname=hashname)
371 h2 = h1.copy()
372 h2.update(b"test update should not affect original")
373 h1.update(msg)
374 self.check_object(h1, hexdigest, hashname, digest_size, block_size)
375
376 def assert_hmac_extra_cases(
377 self, key, msg, hexdigest, digestmod, hashname, digest_size, block_size

Callers 1

assert_hmacMethod · 0.95

Calls 4

hmac_new_by_nameMethod · 0.95
check_objectMethod · 0.80
copyMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected