diff options
author | Linda Wang <wangwulin@huawei.com> | 2017-09-07 03:34:58 +0000 |
---|---|---|
committer | Linda Wang <wangwulin@huawei.com> | 2017-09-07 06:51:02 +0000 |
commit | 6a37f26bf045b267933b3eea8eaf948deb0d682b (patch) | |
tree | 6a67e371ff0e8c6b4df65edb121eac4564b8786e /functest/api | |
parent | cbb64439160caa48d5725b3ee8be0023103a9ec7 (diff) |
Unify the key as testcase in result
Change-Id: I4933b013349e64a6e018938db99ecdf6d9c723da
Signed-off-by: Linda Wang <wangwulin@huawei.com>
Diffstat (limited to 'functest/api')
-rw-r--r-- | functest/api/resources/v1/testcases.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/functest/api/resources/v1/testcases.py b/functest/api/resources/v1/testcases.py index b7d7b4aa..cc2d4e19 100644 --- a/functest/api/resources/v1/testcases.py +++ b/functest/api/resources/v1/testcases.py @@ -89,8 +89,8 @@ class V1Testcase(ApiResource): task_thread = thread.TaskThread(self._run, task_args, TasksHandler()) task_thread.start() - results = {'testcase': case_name, 'task_id': task_id} - return jsonify(results) + result = {'testcase': case_name, 'task_id': task_id} + return jsonify({'result': result}) def _run(self, args): # pylint: disable=no-self-use """ The built_in function to run a test case """ @@ -120,7 +120,7 @@ class V1Testcase(ApiResource): } result = { 'task_id': args.get('task_id'), - 'case_name': case_name, + 'testcase': case_name, 'env_info': env_info, 'result': result } |