def test_direct_assignment(self): for test_hash in self.test_sha256_hashes: file_hash = FileHash(test_hash[1]) direct_hash = file_hash.hash() self.assertEqual(direct_hash, file_hash.update(test_hash[0]).hash())
def test_hashing_algorithms(self): file_hash = FileHash() for test_hash in self.test_sha256_hashes: self.assertEqual(file_hash.update(test_hash[0]).hash(), test_hash[1])