MCPcopy Create free account
hub / github.com/subbarayudu-j/TheAlgorithms-Python / SHA1HashTest

Class SHA1HashTest

hashes/sha1.py:115–121  ·  view source on GitHub ↗

Test class for the SHA1Hash class. Inherits the TestCase class from unittest

Source from the content-addressed store, hash-verified

113
114
115class SHA1HashTest(unittest.TestCase):
116 """
117 Test class for the SHA1Hash class. Inherits the TestCase class from unittest
118 """
119 def testMatchHashes(self):
120 msg = bytes('Test String', 'utf-8')
121 self.assertEqual(SHA1Hash(msg).final_hash(), hashlib.sha1(msg).hexdigest())
122
123
124def main():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected