summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/resources
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2017-04-06 16:59:19 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2017-04-06 16:59:19 +0800
commit2754e19e72487793f1e381147768cf122d399b7b (patch)
tree9aa302f457fd8736286f813b9ae8118a3e7662eb /testapi/opnfv_testapi/resources
parent0620b2cbb21714c1a5e485186c46c2c24485ef37 (diff)
change not_found to forbidden when db not exist
Change-Id: I1aa61c5d1b057b5a53cf6369b26605867a4d092e Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'testapi/opnfv_testapi/resources')
-rw-r--r--testapi/opnfv_testapi/resources/result_handlers.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/testapi/opnfv_testapi/resources/result_handlers.py b/testapi/opnfv_testapi/resources/result_handlers.py
index 609c5ce..fb5ed9e 100644
--- a/testapi/opnfv_testapi/resources/result_handlers.py
+++ b/testapi/opnfv_testapi/resources/result_handlers.py
@@ -145,20 +145,20 @@ class ResultsCLHandler(GenericResultHandler):
return {'name': data.pod_name}
def pod_error(data):
- return httplib.NOT_FOUND, message.not_found('pod', data.pod_name)
+ return httplib.FORBIDDEN, message.not_found('pod', data.pod_name)
def project_query(data):
return {'name': data.project_name}
def project_error(data):
- return httplib.NOT_FOUND, message.not_found('project',
+ return httplib.FORBIDDEN, message.not_found('project',
data.project_name)
def testcase_query(data):
return {'project_name': data.project_name, 'name': data.case_name}
def testcase_error(data):
- return httplib.NOT_FOUND, message.not_found('testcase',
+ return httplib.FORBIDDEN, message.not_found('testcase',
data.case_name)
miss_checks = ['pod_name', 'project_name', 'case_name']