Merge "Fix test incompatibilities with py35"
diff --git a/designate_tempest_plugin/services/dns/json/base.py b/designate_tempest_plugin/services/dns/json/base.py
index 6c5f1d2..d7bf614 100644
--- a/designate_tempest_plugin/services/dns/json/base.py
+++ b/designate_tempest_plugin/services/dns/json/base.py
@@ -66,7 +66,7 @@
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()
diff --git a/designate_tempest_plugin/tests/api/admin/test_quotas.py b/designate_tempest_plugin/tests/api/admin/test_quotas.py
index ae49460..ad298b7 100644
--- a/designate_tempest_plugin/tests/api/admin/test_quotas.py
+++ b/designate_tempest_plugin/tests/api/admin/test_quotas.py
@@ -61,7 +61,7 @@
_, 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):
diff --git a/designate_tempest_plugin/tests/api/v2/test_blacklists.py b/designate_tempest_plugin/tests/api/v2/test_blacklists.py
index cc7260d..c5eceb9 100644
--- a/designate_tempest_plugin/tests/api/v2/test_blacklists.py
+++ b/designate_tempest_plugin/tests/api/v2/test_blacklists.py
@@ -70,7 +70,7 @@
_, 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):
diff --git a/designate_tempest_plugin/tests/api/v2/test_quotas.py b/designate_tempest_plugin/tests/api/v2/test_quotas.py
index bd865bb..33c0f95 100644
--- a/designate_tempest_plugin/tests/api/v2/test_quotas.py
+++ b/designate_tempest_plugin/tests/api/v2/test_quotas.py
@@ -63,7 +63,7 @@
_, 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):