Arvados-DCO-1.1-Signed-off-by: Radhika Chippada <radhika@curoverse.com>
[arvados.git] / sdk / python / tests / test_cache.py
index 02a8817f2aea64a7799e31ee570ab12ee73d429e..259acd0a3079bdeba319c46e931617c15b9b8af4 100644 (file)
@@ -1,3 +1,7 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
 from __future__ import print_function
 from __future__ import absolute_import
 
@@ -37,8 +41,8 @@ class CacheTestThread(threading.Thread):
                 data_in = hashlib.md5(data_in).hexdigest().encode() + b"\n" + data_in
                 c.set(url, data_in)
                 data_out = c.get(url)
-                digest, _, content = data_out.partition("\n")
-                if digest != bytes(hashlib.md5(content).hexdigest()):
+                digest, _, content = data_out.partition(b"\n")
+                if digest != hashlib.md5(content).hexdigest().encode():
                     self.ok = False
             except Exception as err:
                 self.ok = False