From 26efacba9304071956d16a9a50a18e8f243518bb Mon Sep 17 00:00:00 2001 From: Linda Wang Date: Fri, 18 Aug 2017 06:09:56 +0000 Subject: Create API to run a test case Two APIs are created here: 1. Run a test case 2. Get the result of the task id JIRA: FUNCTEST-853 Change-Id: I12950933b143b82fb6aeb186ea1b35ddd16e6097 Signed-off-by: Linda Wang --- functest/api/common/error.py | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 functest/api/common/error.py (limited to 'functest/api/common/error.py') diff --git a/functest/api/common/error.py b/functest/api/common/error.py deleted file mode 100644 index d0045225..00000000 --- a/functest/api/common/error.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 - -""" -Used to handle results - -""" - -from flask import jsonify - - -def result_handler(status, data): - """ Return the json format of result in dict """ - result = { - 'status': status, - 'result': data - } - return jsonify(result) -- cgit 1.2.3-korg