diff options
author | Serena Feng <feng.xiaowei@zte.com.cn> | 2018-01-04 08:39:47 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-01-04 08:39:47 +0000 |
commit | ee2a75a5147728900204d6ec508159f4be208644 (patch) | |
tree | 0ac2a8d022dc3be9077115234dfcb47fd459569f /testapi/opnfv_testapi/tests/unit/handlers/test_base.py | |
parent | eb7071a2d6e396dd044d899bd6a6a1512fee9596 (diff) | |
parent | db36e98243a4cb1c12d2245b8469743168d00f06 (diff) |
Merge "add deployment result collecting interfaces"
Diffstat (limited to 'testapi/opnfv_testapi/tests/unit/handlers/test_base.py')
-rw-r--r-- | testapi/opnfv_testapi/tests/unit/handlers/test_base.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testapi/opnfv_testapi/tests/unit/handlers/test_base.py b/testapi/opnfv_testapi/tests/unit/handlers/test_base.py index 4e5c0d9..c98ed69 100644 --- a/testapi/opnfv_testapi/tests/unit/handlers/test_base.py +++ b/testapi/opnfv_testapi/tests/unit/handlers/test_base.py @@ -81,6 +81,16 @@ class TestBase(testing.AsyncHTTPTestCase): self.config_patcher.start() self.db_patcher.start() + @staticmethod + def load_json(json_file): + abs_file = path.join(path.dirname(__file__), + '../templates', + json_file + '.json') + with open(abs_file, 'r') as f: + loader = json.load(f) + f.close() + return loader + def get_app(self): from opnfv_testapi.cmd import server return server.make_app() @@ -210,4 +220,5 @@ class TestBase(testing.AsyncHTTPTestCase): fake_pymongo.projects.clear() fake_pymongo.testcases.clear() fake_pymongo.results.clear() + fake_pymongo.deployresults.clear() fake_pymongo.scenarios.clear() |