Co-authored-by: Arjun <ccldarjun@icloud.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
self.fail("Exception raised during normal usage of HMAC class.")
+class UpdateTestCase(unittest.TestCase):
+ @hashlib_helper.requires_hashdigest('sha256')
+ def test_with_str_update(self):
+ with self.assertRaises(TypeError):
+ h = hmac.new(b"key", digestmod='sha256')
+ h.update("invalid update")
+
+
class CopyTestCase(unittest.TestCase):
@hashlib_helper.requires_hashdigest('sha256')