summaryrefslogtreecommitdiffstats
path: root/utils/test/testapi/opnfv_testapi/tests/unit/test_base.py
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2017-02-20 14:32:29 +0800
committerSerena Feng <feng.xiaowei@zte.com.cn>2017-02-21 03:09:59 +0000
commita2567392d367889f2fd2bb464ce8b05bce12eb0c (patch)
tree2fabbca4f7779d6695d8fa0f932f6ffb6a6daee1 /utils/test/testapi/opnfv_testapi/tests/unit/test_base.py
parent47a6e089bb716dddf7bd2aad0c5a9e389d543156 (diff)
fix violation of import rule in TestAPI
TestAPI violate import rule of OpenStack Style a lot, like Do not import objects, only modules Do not import more than one module per line Alphabetically order your imports by the full module path This patch is mean to fix them. Change-Id: Ia05b944a74b3f443c9101a9840f613f9a6f5ae49 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'utils/test/testapi/opnfv_testapi/tests/unit/test_base.py')
-rw-r--r--utils/test/testapi/opnfv_testapi/tests/unit/test_base.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/utils/test/testapi/opnfv_testapi/tests/unit/test_base.py b/utils/test/testapi/opnfv_testapi/tests/unit/test_base.py
index fc780e44c..84d611bf0 100644
--- a/utils/test/testapi/opnfv_testapi/tests/unit/test_base.py
+++ b/utils/test/testapi/opnfv_testapi/tests/unit/test_base.py
@@ -8,20 +8,20 @@
##############################################################################
import json
-from tornado.web import Application
-from tornado.testing import AsyncHTTPTestCase
+from tornado import testing
+from tornado import web
-from opnfv_testapi.router import url_mappings
-from opnfv_testapi.resources.models import CreateResponse
import fake_pymongo
+from opnfv_testapi.resources import models
+from opnfv_testapi.router import url_mappings
-class TestBase(AsyncHTTPTestCase):
+class TestBase(testing.AsyncHTTPTestCase):
headers = {'Content-Type': 'application/json; charset=UTF-8'}
def setUp(self):
self.basePath = ''
- self.create_res = CreateResponse
+ self.create_res = models.CreateResponse
self.get_res = None
self.list_res = None
self.update_res = None
@@ -31,7 +31,7 @@ class TestBase(AsyncHTTPTestCase):
super(TestBase, self).setUp()
def get_app(self):
- return Application(
+ return web.Application(
url_mappings.mappings,
db=fake_pymongo,
debug=True,