summaryrefslogtreecommitdiffstats
path: root/utils/test/result_collection_api/resources/result_models.py
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2016-05-29 01:12:54 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2016-05-29 01:24:21 +0800
commit534ca019931d48a2a5f4075c0ca36b501d8f793d (patch)
tree6d1dc0b1ecdee7e802b9767d8c9874154c537127 /utils/test/result_collection_api/resources/result_models.py
parentabf00874c02f5c9776368473081a420d6496c049 (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 'utils/test/result_collection_api/resources/result_models.py')
-rw-r--r--utils/test/result_collection_api/resources/result_models.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/utils/test/result_collection_api/resources/result_models.py b/utils/test/result_collection_api/resources/result_models.py
index 15684e229..7faac16d4 100644
--- a/utils/test/result_collection_api/resources/result_models.py
+++ b/utils/test/result_collection_api/resources/result_models.py
@@ -1,4 +1,7 @@
+from tornado_swagger_ui.tornado_swagger import swagger
+
+@swagger.model()
class ResultCreateRequest(object):
def __init__(self,
pod_name=None,
@@ -43,9 +46,8 @@ class ResultCreateRequest(object):
}
-class TestResult:
- """ Describes a test result"""
-
+@swagger.model()
+class TestResult(object):
def __init__(self):
self._id = None
self.case_name = None
@@ -132,7 +134,11 @@ class TestResult:
}
+@swagger.model()
class TestResults(object):
+ """
+ @ptype testcases: C{list} of L{TestResult}
+ """
def __init__(self, results=list()):
self.results = results