summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/tests/unit/resources/test_base.py
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2017-08-14 17:41:02 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2017-08-15 17:46:09 +0800
commit015ee1e72119dbc884cecbaf6149922850df7223 (patch)
tree2ac31a5f0a8f871390e40242ab90fceaabfc4c69 /testapi/opnfv_testapi/tests/unit/resources/test_base.py
parent8e1c6ad2711cb566b61c11919f9a95eb304220c5 (diff)
update scenario scores
update score url: POST /api/v1/scenarios/<scenario_name>/scores? \ installer=<installer_name>& \ version=<version_name>& \ project=<project_name> add new score record interface add unit test add swagger specification Change-Id: Ib7bb31f303a9a9402325476bfdadb58aa0df560e Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'testapi/opnfv_testapi/tests/unit/resources/test_base.py')
-rw-r--r--testapi/opnfv_testapi/tests/unit/resources/test_base.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/testapi/opnfv_testapi/tests/unit/resources/test_base.py b/testapi/opnfv_testapi/tests/unit/resources/test_base.py
index dcec4e9..aa6b835 100644
--- a/testapi/opnfv_testapi/tests/unit/resources/test_base.py
+++ b/testapi/opnfv_testapi/tests/unit/resources/test_base.py
@@ -63,9 +63,12 @@ class TestBase(testing.AsyncHTTPTestCase):
return self.create_help(self.basePath, req, *args)
def create_help(self, uri, req, *args):
+ return self.post_direct_url(self._update_uri(uri, *args), req)
+
+ def post_direct_url(self, url, req):
if req and not isinstance(req, str) and hasattr(req, 'format'):
req = req.format()
- res = self.fetch(self._update_uri(uri, *args),
+ res = self.fetch(url,
method='POST',
body=json.dumps(req),
headers=self.headers)