示例#1
0
 def test_hello_world_checksum_sha256(self):
     """
     Test calculating the sha256 of a string
     """
     chksum = CheckSum('nofile', 'sha256')
     shasum = chksum.hashfile(self.fake_file)
     self.assertEqual(self.hello_world_sha256sum, shasum)
示例#2
0
 def test_hello_world_checksum_md5(self):
     """
     Test calculating the md5 of a string
     """
     chksum = CheckSum('nofile', 'md5')
     mdsum = chksum.hashfile(self.fake_file)
     self.assertEqual(self.hello_world_md5sum, mdsum)