Merge "Fix test incompatibilities with py35"
This commit is contained in:
commit
4c094d1776
|
@ -66,7 +66,7 @@ class DnsClientBase(rest_client.RestClient):
|
|||
if 'application/json' in resp['content-type']:
|
||||
return json.loads(object_str)
|
||||
elif 'text/dns' in resp['content-type']:
|
||||
return models.ZoneFile.from_text(object_str)
|
||||
return models.ZoneFile.from_text(object_str.decode("utf-8"))
|
||||
else:
|
||||
raise lib_exc.InvalidContentType()
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ class QuotasAdminTest(BaseQuotasTest):
|
|||
_, body = self.admin_client.delete_quotas()
|
||||
|
||||
LOG.info("Ensuring an empty response body")
|
||||
self.assertEqual(body.strip(), "")
|
||||
self.assertEqual(body.strip(), b"")
|
||||
|
||||
@decorators.idempotent_id('4f2b65b7-c4e1-489c-9047-755e42ba0985')
|
||||
def test_update_quotas(self):
|
||||
|
|
|
@ -70,7 +70,7 @@ class BlacklistsAdminTest(BaseBlacklistsTest):
|
|||
_, body = self.admin_client.delete_blacklist(blacklist['id'])
|
||||
|
||||
# A blacklist delete returns an empty body
|
||||
self.assertEqual(body.strip(), "")
|
||||
self.assertEqual(body.strip(), b"")
|
||||
|
||||
@decorators.idempotent_id('3a2a1e6c-8176-428c-b5dd-d85217c0209d')
|
||||
def test_list_blacklists(self):
|
||||
|
|
|
@ -63,7 +63,7 @@ class QuotasV2Test(base.BaseDnsV2Test):
|
|||
_, body = self.admin_client.delete_quotas()
|
||||
|
||||
LOG.info("Ensuring an empty response body")
|
||||
self.assertEqual(body.strip(), "")
|
||||
self.assertEqual(body.strip(), b"")
|
||||
|
||||
@decorators.idempotent_id('76d24c87-1b39-4e19-947c-c08e1380dc61')
|
||||
def test_update_quotas(self):
|
||||
|
|
Loading…
Reference in New Issue