summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/tests/unit/test_base.py
diff options
context:
space:
mode:
Diffstat (limited to 'testapi/opnfv_testapi/tests/unit/test_base.py')
-rw-r--r--testapi/opnfv_testapi/tests/unit/test_base.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/testapi/opnfv_testapi/tests/unit/test_base.py b/testapi/opnfv_testapi/tests/unit/test_base.py
index a6e7339..4d34456 100644
--- a/testapi/opnfv_testapi/tests/unit/test_base.py
+++ b/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):