MCPcopy Index your code
hub / github.com/RustPython/RustPython / assert_hmac_common_cases

Method assert_hmac_common_cases

Lib/test/test_hmac.py:367–375  ·  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

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