Browse Source

Merge "Fix test incompatibilities with py35"

Jenkins 1 year ago
parent
commit
4c094d1776

+ 1
- 1
designate_tempest_plugin/services/dns/json/base.py View File

@@ -66,7 +66,7 @@ class DnsClientBase(rest_client.RestClient):
66 66
         if 'application/json' in resp['content-type']:
67 67
             return json.loads(object_str)
68 68
         elif 'text/dns' in resp['content-type']:
69
-            return models.ZoneFile.from_text(object_str)
69
+            return models.ZoneFile.from_text(object_str.decode("utf-8"))
70 70
         else:
71 71
             raise lib_exc.InvalidContentType()
72 72
 

+ 1
- 1
designate_tempest_plugin/tests/api/admin/test_quotas.py View File

@@ -61,7 +61,7 @@ class QuotasAdminTest(BaseQuotasTest):
61 61
         _, body = self.admin_client.delete_quotas()
62 62
 
63 63
         LOG.info("Ensuring an empty response body")
64
-        self.assertEqual(body.strip(), "")
64
+        self.assertEqual(body.strip(), b"")
65 65
 
66 66
     @decorators.idempotent_id('4f2b65b7-c4e1-489c-9047-755e42ba0985')
67 67
     def test_update_quotas(self):

+ 1
- 1
designate_tempest_plugin/tests/api/v2/test_blacklists.py View File

@@ -70,7 +70,7 @@ class BlacklistsAdminTest(BaseBlacklistsTest):
70 70
         _, body = self.admin_client.delete_blacklist(blacklist['id'])
71 71
 
72 72
         # A blacklist delete returns an empty body
73
-        self.assertEqual(body.strip(), "")
73
+        self.assertEqual(body.strip(), b"")
74 74
 
75 75
     @decorators.idempotent_id('3a2a1e6c-8176-428c-b5dd-d85217c0209d')
76 76
     def test_list_blacklists(self):

+ 1
- 1
designate_tempest_plugin/tests/api/v2/test_quotas.py View File

@@ -63,7 +63,7 @@ class QuotasV2Test(base.BaseDnsV2Test):
63 63
         _, body = self.admin_client.delete_quotas()
64 64
 
65 65
         LOG.info("Ensuring an empty response body")
66
-        self.assertEqual(body.strip(), "")
66
+        self.assertEqual(body.strip(), b"")
67 67
 
68 68
     @decorators.idempotent_id('76d24c87-1b39-4e19-947c-c08e1380dc61')
69 69
     def test_update_quotas(self):

Loading…
Cancel
Save