Clean imports in code

In some part in the code we import objects. In the Openstack style
guidelines they recommend to import only modules.

http://docs.openstack.org/developer/hacking/#imports

Change-Id: I16375787fd1216c8ac26cbbb9dd0a433b839f76a
This commit is contained in:
Nguyen Hung Phuong 2016-09-12 16:42:18 +07:00
parent becf87db8b
commit 6cf984c49f
3 changed files with 6 additions and 6 deletions

View File

@ -14,7 +14,7 @@
# limitations under the License.
import six
from oslo_messaging import Serializer
import oslo_messaging
ATTR_NOT_SPECIFIED = object()
@ -31,7 +31,7 @@ _SINGLETON_MAPPING = Mapping({
})
class KingbirdSerializer(Serializer):
class KingbirdSerializer(oslo_messaging.Serializer):
def __init__(self, base=None):
super(KingbirdSerializer, self).__init__()
self._base = base

View File

@ -19,7 +19,7 @@ from oslo_config import cfg
from kingbird.api.controllers.v1 import quota_class
from kingbird.common import config
from kingbird.tests.unit.api.testroot import KBApiTest
from kingbird.tests.unit.api import testroot
config.register_options()
OPT_GROUP_NAME = 'keystone_authtoken'
@ -33,7 +33,7 @@ class Result(object):
self.hard_limit = hard_limit
class TestQuotaClassController(KBApiTest):
class TestQuotaClassController(testroot.KBApiTest):
def setUp(self):
super(TestQuotaClassController, self).setUp()
cfg.CONF.set_override('admin_tenant', 'fake_tenant_id',

View File

@ -21,7 +21,7 @@ from oslo_config import cfg
from kingbird.api.controllers import quota_manager
from kingbird.common import config
from kingbird.rpc import client as rpc_client
from kingbird.tests.unit.api.testroot import KBApiTest
from kingbird.tests.unit.api import testroot
config.register_options()
OPT_GROUP_NAME = 'keystone_authtoken'
cfg.CONF.import_group(OPT_GROUP_NAME, "keystonemiddleware.auth_token")
@ -34,7 +34,7 @@ class Result(object):
self.hard_limit = hard_limit
class TestQuotaManager(KBApiTest):
class TestQuotaManager(testroot.KBApiTest):
def setUp(self):
super(TestQuotaManager, self).setUp()
cfg.CONF.set_override('admin_tenant', 'fake_tenant_id',