summaryrefslogtreecommitdiffstats
path: root/utils/test/testapi/opnfv_testapi/tests/unit
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2017-05-12 18:33:00 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2017-05-17 16:43:12 +0800
commita1a745b4820ec46a2e707d77f6178cf9e97654f6 (patch)
tree08521a4c07d8f06a28e3c026c2614ecf6d97e2f7 /utils/test/testapi/opnfv_testapi/tests/unit
parentf1415796efec4984962f9817639a5ff2cd9ecd41 (diff)
refactor static_path to accomodate web portal
move tornado_swagger/static to opnfv_testapi/static move swagger related 3rd libs to 3rd_party/swagger Change-Id: I32bba10584c99d13687b93f32577e37581db0c63 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'utils/test/testapi/opnfv_testapi/tests/unit')
-rw-r--r--utils/test/testapi/opnfv_testapi/tests/unit/test_base.py7
1 files changed, 6 insertions, 1 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 a6e733914..4d3445659 100644
--- a/utils/test/testapi/opnfv_testapi/tests/unit/test_base.py
+++ b/utils/test/testapi/opnfv_testapi/tests/unit/test_base.py
@@ -12,10 +12,13 @@ from os import path
import mock
from tornado import testing
-from opnfv_testapi.cmd import server
+from opnfv_testapi.common import config
from opnfv_testapi.resources import models
from opnfv_testapi.tests.unit import fake_pymongo
+config.Config.CONFIG = path.join(path.dirname(__file__),
+ '../../../etc/config.ini')
+
class TestBase(testing.AsyncHTTPTestCase):
headers = {'Content-Type': 'application/json; charset=UTF-8'}
@@ -36,6 +39,7 @@ class TestBase(testing.AsyncHTTPTestCase):
self.db_patcher.stop()
def _patch_server(self):
+ from opnfv_testapi.cmd import server
server.parse_config([
'--config-file',
path.join(path.dirname(__file__), 'common/normal.ini')
@@ -49,6 +53,7 @@ class TestBase(testing.AsyncHTTPTestCase):
return fake_pymongo
def get_app(self):
+ from opnfv_testapi.cmd import server
return server.make_app()
def create_d(self, *args):