diff options
author | 2016-05-29 01:12:54 +0800 | |
---|---|---|
committer | 2016-05-29 01:24:21 +0800 | |
commit | da918db679b094948cf95670f0fa74a4528ee336 (patch) | |
tree | 95eb8fbea473454d0e4798364ab4b0119fce72f6 /result_collection_api/resources/project_handlers.py | |
parent | 3a03a7efbdaf54fa5789c8d08119c7ac5b8f0a08 (diff) |
swagger-ize result-apis of testAPI
JIRA: FUNCTEST-270
Change-Id: I82b1e3acee82d9b4931531c9404e13a663ff32de
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'result_collection_api/resources/project_handlers.py')
-rw-r--r-- | result_collection_api/resources/project_handlers.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/result_collection_api/resources/project_handlers.py b/result_collection_api/resources/project_handlers.py index e56c01c..0bc1a61 100644 --- a/result_collection_api/resources/project_handlers.py +++ b/result_collection_api/resources/project_handlers.py @@ -33,7 +33,7 @@ class ProjectCLHandler(GenericProjectHandler): @rtype: L{Project} @return 200: project is created. @raise 403: project already exists - @raise 400: post without body + @raise 400: body or name not provided """ def query(data): return {'name': data.name} @@ -42,8 +42,9 @@ class ProjectCLHandler(GenericProjectHandler): message = '{} already exists as a project'.format(data.name) return HTTP_FORBIDDEN, message - db_check = [(self.table, False, query, error)] - self._create(db_check) + miss_checks = ['name'] + db_checks = [(self.table, False, query, error)] + self._create(miss_checks, db_checks) class ProjectGURHandler(GenericProjectHandler): |