We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9f8cf0 commit c6455ffCopy full SHA for c6455ff
Lib/test/test_hmac.py
@@ -479,6 +479,14 @@ def test_exercise_all_methods(self):
479
self.fail("Exception raised during normal usage of HMAC class.")
480
481
482
+class UpdateTestCase(unittest.TestCase):
483
+ @hashlib_helper.requires_hashdigest('sha256')
484
+ def test_with_str_update(self):
485
+ with self.assertRaises(TypeError):
486
+ h = hmac.new(b"key", digestmod='sha256')
487
+ h.update("invalid update")
488
+
489
490
class CopyTestCase(unittest.TestCase):
491
492
@hashlib_helper.requires_hashdigest('sha256')
0 commit comments