summaryrefslogtreecommitdiffstats
path: root/utils/test/result_collection_api/resources/testcase_handlers.py
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-05-30 06:52:58 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-05-30 06:52:58 +0000
commit04578f6f8c56ae2585c9aec637812d812919be46 (patch)
tree8ca191c076cdd44db3e4ecb990648928f696794a /utils/test/result_collection_api/resources/testcase_handlers.py
parent9a4aee1b758d5b518b20e90aee4fe75eb01aa774 (diff)
parent534ca019931d48a2a5f4075c0ca36b501d8f793d (diff)
Merge "swagger-ize result-apis of testAPI"
Diffstat (limited to 'utils/test/result_collection_api/resources/testcase_handlers.py')
-rw-r--r--utils/test/result_collection_api/resources/testcase_handlers.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/test/result_collection_api/resources/testcase_handlers.py b/utils/test/result_collection_api/resources/testcase_handlers.py
index 9c0eb6363..8f3bea617 100644
--- a/utils/test/result_collection_api/resources/testcase_handlers.py
+++ b/utils/test/result_collection_api/resources/testcase_handlers.py
@@ -37,7 +37,7 @@ class TestcaseCLHandler(GenericTestcaseHandler):
@return 200: testcase is created in this project.
@raise 403: project not exist
or testcase already exists in this project
- @raise 400: post without body
+ @raise 400: body or name not provided
"""
def p_query(data):
return {'name': data.project_name}
@@ -57,9 +57,10 @@ class TestcaseCLHandler(GenericTestcaseHandler):
.format(data.name, data.project_name)
return HTTP_FORBIDDEN, message
+ miss_checks = ['name']
db_checks = [(self.db_projects, True, p_query, p_error),
(self.db_testcases, False, tc_query, tc_error)]
- self._create(db_checks, project_name=project_name)
+ self._create(miss_checks, db_checks, project_name=project_name)
class TestcaseGURHandler(GenericTestcaseHandler):