Clean imports in code
This patch set modifies lines which are importing objects instead of modules. As per openstack import guide lines, user should import modules in a file not objects. http://docs.openstack.org/developer/hacking/#imports Change-Id: I846a3edcea448ea09764f4f3d435f5c7a95326ff
This commit is contained in:
parent
7967b0e91a
commit
a585e94bdd
@ -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)
|
||||
|
@ -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()
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user