Merge pull request #291 from tianhao64/master

Python3: fix 2 unit test cases (issue #290)
This commit is contained in:
Shawn Hartsock
2015-10-08 12:11:14 -04:00
2 changed files with 4 additions and 4 deletions

View File

@@ -64,10 +64,10 @@ class Iso8601Tests(tests.VCRTestBase):
def has_tag(doc):
if doc is None:
return False
return '<dateTime>' in doc
return '<dateTime>' in doc.decode("utf-8")
def correct_time_string(doc):
return '<dateTime>{0}</dateTime>'.format(now_string) in doc
return '<dateTime>{0}</dateTime>'.format(now_string) in doc.decode("utf-8")
def check_date_time_value(r1, r2):
for r in [r1, r2]:

View File

@@ -31,7 +31,7 @@ class SerializerTests(tests.VCRTestBase):
'</_this>'
'</RetrieveServiceContent>'
'</soapenv:Body>')
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</_this>'
in cass.requests[0].body)
in cass.requests[0].body.decode("utf-8"))