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

Method test_methods

Lib/test/test_hmac.py:1064–1070  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1062 block_size: int
1063
1064 def test_methods(self):
1065 h = self.hmac_new(b"my secret key", digestmod=self.digestname)
1066 self.assertIsInstance(h, self.hmac_class)
1067 self.assertIsNone(h.update(b"compute the hash of this text!"))
1068 self.assertIsInstance(h.digest(), bytes)
1069 self.assertIsInstance(h.hexdigest(), str)
1070 self.assertIsInstance(h.copy(), self.hmac_class)
1071
1072 def test_properties(self):
1073 h = self.hmac_new(b"my secret key", digestmod=self.digestname)

Callers

nothing calls this directly

Calls 7

assertIsInstanceMethod · 0.80
assertIsNoneMethod · 0.80
hexdigestMethod · 0.80
hmac_newMethod · 0.45
updateMethod · 0.45
digestMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected