diff options
author | SerenaFeng <feng.xiaowei@zte.com.cn> | 2016-05-27 16:55:17 +0800 |
---|---|---|
committer | SerenaFeng <feng.xiaowei@zte.com.cn> | 2016-05-27 16:58:48 +0800 |
commit | fd767d0b24749d5834a4aae85785a2e397da34bf (patch) | |
tree | 1b57fa64896dc9fa79d833ef06a80fd4dc363b30 /utils/test/result_collection_api/resources/testcase_models.py | |
parent | 6668fa4f4c1b660dc130775b3a3d8c38d6646e8d (diff) |
swagger-ize testcase-apis of testAPI
Change-Id: Ibe4b068fd667b796455be3fd4d9701d50879aace
JIRA: FUNCTEST-266
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'utils/test/result_collection_api/resources/testcase_models.py')
-rw-r--r-- | utils/test/result_collection_api/resources/testcase_models.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/utils/test/result_collection_api/resources/testcase_models.py b/utils/test/result_collection_api/resources/testcase_models.py index a9ba41ad1..f3867649f 100644 --- a/utils/test/result_collection_api/resources/testcase_models.py +++ b/utils/test/result_collection_api/resources/testcase_models.py @@ -1,5 +1,11 @@ +from tornado_swagger_ui.tornado_swagger import swagger + +__author__ = '__serena__' + + +@swagger.model() class TestcaseCreateRequest(object): - def __init__(self, url=None, name=None, description=None): + def __init__(self, name, url=None, description=None): self.name = name self.url = url self.description = description @@ -12,6 +18,7 @@ class TestcaseCreateRequest(object): } +@swagger.model() class TestcaseUpdateRequest(object): def __init__(self, name=None, description=None, project_name=None): self.name = name @@ -26,7 +33,8 @@ class TestcaseUpdateRequest(object): } -class Testcase: +@swagger.model() +class Testcase(object): """ Describes a test case""" def __init__(self): @@ -73,7 +81,11 @@ class Testcase: } +@swagger.model() class Testcases(object): + """ + @ptype testcases: C{list} of L{Testcase} + """ def __init__(self, testcases=list()): self.testcases = testcases |