Merge pull request #5265 from achillesrasquinha/py3-tests

unicode hash test fix
This commit is contained in:
Achilles Rasquinha 2018-03-23 17:59:59 +05:30 committed by GitHub
commit 42d737c030
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,6 +34,9 @@ class TestTransactionLog(unittest.TestCase):
sha = hashlib.sha256()
sha.update(str(third_log.transaction_hash) + str(second_log.chaining_hash))
sha.update(
frappe.safe_encode(str(third_log.transaction_hash)) +
frappe.safe_encode(str(second_log.chaining_hash))
)
self.assertEqual(sha.hexdigest(), third_log.chaining_hash)