diff --git a/designate_tempest_plugin/clients.py b/designate_tempest_plugin/clients.py index d85d3437..5a8136c0 100644 --- a/designate_tempest_plugin/clients.py +++ b/designate_tempest_plugin/clients.py @@ -13,9 +13,7 @@ # under the License. from tempest import clients from tempest import config -from tempest.lib.auth import KeystoneAuthProvider -from tempest.lib.auth import KeystoneV2AuthProvider -from tempest.lib.auth import KeystoneV3AuthProvider +from tempest.lib import auth from designate_tempest_plugin.services.dns.v1.json.domains_client import \ DomainsClient @@ -158,7 +156,7 @@ class ManagerV2Unauthed(ManagerV2): return KeystoneV2UnauthedProvider -class BaseUnauthedProvider(KeystoneAuthProvider): +class BaseUnauthedProvider(auth.KeystoneAuthProvider): def _decorate_request(self, filters, method, url, headers=None, body=None, auth_data=None): @@ -173,13 +171,15 @@ class BaseUnauthedProvider(KeystoneAuthProvider): return url, headers, body -class KeystoneV2UnauthedProvider(KeystoneV2AuthProvider, BaseUnauthedProvider): +class KeystoneV2UnauthedProvider(auth.KeystoneV2AuthProvider, + BaseUnauthedProvider): def _decorate_request(self, *args, **kwargs): return BaseUnauthedProvider._decorate_request(self, *args, **kwargs) -class KeystoneV3UnauthedProvider(KeystoneV3AuthProvider, BaseUnauthedProvider): +class KeystoneV3UnauthedProvider(auth.KeystoneV3AuthProvider, + BaseUnauthedProvider): def _decorate_request(self, *args, **kwargs): return BaseUnauthedProvider._decorate_request(self, *args, **kwargs) diff --git a/designate_tempest_plugin/services/dns/json/base.py b/designate_tempest_plugin/services/dns/json/base.py index 19dbe456..6c5f1d25 100644 --- a/designate_tempest_plugin/services/dns/json/base.py +++ b/designate_tempest_plugin/services/dns/json/base.py @@ -20,7 +20,7 @@ from tempest.lib import exceptions as lib_exc from six.moves.urllib import parse as urllib import six -from designate_tempest_plugin.common.models import ZoneFile +from designate_tempest_plugin.common import models LOG = logging.getLogger(__name__) @@ -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 ZoneFile.from_text(object_str) + return models.ZoneFile.from_text(object_str) else: raise lib_exc.InvalidContentType() diff --git a/designate_tempest_plugin/tests/api/v2/test_unauthed.py b/designate_tempest_plugin/tests/api/v2/test_unauthed.py index e788a3b0..b48cfd79 100644 --- a/designate_tempest_plugin/tests/api/v2/test_unauthed.py +++ b/designate_tempest_plugin/tests/api/v2/test_unauthed.py @@ -17,7 +17,7 @@ from tempest.lib import exceptions as lib_exc import ddt from designate_tempest_plugin.tests import base -from designate_tempest_plugin.clients import ManagerV2Unauthed +from designate_tempest_plugin import clients LOG = logging.getLogger(__name__) @@ -25,7 +25,7 @@ LOG = logging.getLogger(__name__) @ddt.ddt class TestDnsUnauthed(base.BaseDnsV2Test): - client_manager = ManagerV2Unauthed + client_manager = clients.ManagerV2Unauthed credentials = ["primary"] @classmethod