Fix remaining API tests under python3

This fixes the address_name method to return text, as the to_text
method from dnspython returns bytes, and make 3 new test modules pass.

Change-Id: I5d0e75bd9acdd517ed4a94b1959783a2437cf5a5
This commit is contained in:
Thomas Herve 2017-05-30 21:53:55 +02:00
parent 530c7ec04d
commit 92598a62f1
3 changed files with 2 additions and 5 deletions

View File

@ -108,4 +108,4 @@ class NetworkAPI(DriverPlugin):
"""
Get the name for the address
"""
return reversename.from_address(address).to_text()
return reversename.from_address(address).to_text().decode('utf-8')

View File

@ -573,7 +573,7 @@ class ApiV2ZonesTest(ApiV2TestCase):
# Check the headers are what we expect
self.assertEqual(202, response.status_int)
self.assertEqual('application/json', response.content_type)
self.assertEqual('""', response.body)
self.assertEqual(b'""', response.body)
def test_invalid_xfr_request(self):
# Create a zone

View File

@ -1,7 +1,4 @@
# Blacklist of tests failing on Python 3
designate.tests.test_api.test_v2.test_floatingips
designate.tests.test_api.test_v2.test_zones
designate.tests.test_central.test_service
designate.tests.test_pool_manager.test_service
designate.tests.unit.test_central.test_basic
designate.tests.unit.test_pool