From 6a37f26bf045b267933b3eea8eaf948deb0d682b Mon Sep 17 00:00:00 2001 From: Linda Wang Date: Thu, 7 Sep 2017 03:34:58 +0000 Subject: [PATCH] Unify the key as testcase in result Change-Id: I4933b013349e64a6e018938db99ecdf6d9c723da Signed-off-by: Linda Wang --- functest/api/resources/v1/testcases.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functest/api/resources/v1/testcases.py b/functest/api/resources/v1/testcases.py index b7d7b4aa3..cc2d4e193 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 } -- 2.16.6