From 49c6d5157dd70d8706fbf0d30fe476ba5eae7df6 Mon Sep 17 00:00:00 2001 From: Tianhao He Date: Tue, 29 Sep 2015 17:27:24 -0700 Subject: [PATCH] Python3: fix 2 unit test cases --- tests/test_iso8601.py | 4 ++-- tests/test_serializer.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_iso8601.py b/tests/test_iso8601.py index 3cb27c4..7dbe450 100644 --- a/tests/test_iso8601.py +++ b/tests/test_iso8601.py @@ -64,10 +64,10 @@ class Iso8601Tests(tests.VCRTestBase): def has_tag(doc): if doc is None: return False - return '' in doc + return '' in doc.decode("utf-8") def correct_time_string(doc): - return '{0}'.format(now_string) in doc + return '{0}'.format(now_string) in doc.decode("utf-8") def check_date_time_value(r1, r2): for r in [r1, r2]: diff --git a/tests/test_serializer.py b/tests/test_serializer.py index 937ab1f..97f8783 100644 --- a/tests/test_serializer.py +++ b/tests/test_serializer.py @@ -31,7 +31,7 @@ class SerializerTests(tests.VCRTestBase): '' '' '') - if soap_msg in r1.body: + if soap_msg in r1.body.decode("utf-8"): return True raise SystemError('serialization error occurred') @@ -51,4 +51,4 @@ class SerializerTests(tests.VCRTestBase): self.assertTrue(content is not None) self.assertTrue( '<_this type="ServiceInstance">ServiceInstance' - in cass.requests[0].body) + in cass.requests[0].body.decode("utf-8"))