diff options
Diffstat (limited to 'result_collection_api/resources/testcase_handlers.py')
-rw-r--r-- | result_collection_api/resources/testcase_handlers.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/result_collection_api/resources/testcase_handlers.py b/result_collection_api/resources/testcase_handlers.py index 9c0eb63..8f3bea6 100644 --- a/result_collection_api/resources/testcase_handlers.py +++ b/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): |