summaryrefslogtreecommitdiffstats
path: root/utils/test/result_collection_api/tests/unit/test_result.py
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2016-05-30 19:14:52 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2016-05-30 20:05:11 +0800
commit99700863f3c28fb7fb36e6670b78da828cbbddd4 (patch)
treeef7cd061cafa164c850146d904e99403a954dc9a /utils/test/result_collection_api/tests/unit/test_result.py
parent04578f6f8c56ae2585c9aec637812d812919be46 (diff)
swagger-ize dashboard and version apis of testAPI
JIRA: FUNCTEST-273 Change-Id: I6f2b1de5488ba684d0c00e9f40daee2487a011cc Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'utils/test/result_collection_api/tests/unit/test_result.py')
-rw-r--r--utils/test/result_collection_api/tests/unit/test_result.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/utils/test/result_collection_api/tests/unit/test_result.py b/utils/test/result_collection_api/tests/unit/test_result.py
index 5757df014..a7541b316 100644
--- a/utils/test/result_collection_api/tests/unit/test_result.py
+++ b/utils/test/result_collection_api/tests/unit/test_result.py
@@ -1,4 +1,5 @@
import unittest
+import copy
from test_base import TestBase
from resources.pod_models import PodCreateRequest
@@ -8,7 +9,6 @@ from resources.result_models import ResultCreateRequest, \
TestResult, TestResults
from common.constants import HTTP_OK, HTTP_BAD_REQUEST, HTTP_NOT_FOUND
-
__author__ = '__serena__'
@@ -154,6 +154,27 @@ class TestResultCreate(TestResultBase):
self.assertEqual(code, HTTP_OK)
self.assert_href(body)
+ def test_createSameResults(self):
+ # req_again = ResultCreateRequest(pod_name=self.pod,
+ # project_name=self.project,
+ # case_name=self.case,
+ # installer=self.installer,
+ # version=self.version,
+ # start_date="2016-05-23 08:16:09.477097",
+ # stop_date=self.stop_date,
+ # details=self.details.format(),
+ # build_tag=self.build_tag,
+ # scenario=self.scenario,
+ # criteria=self.criteria,
+ # trust_indicator=self.trust_indicator)
+ req_again = copy.deepcopy(self.req_d)
+ req_again.start_date = "2016-05-23 08:16:09.477097"
+ req_again.stop_date = "2016-05-23 08:16:19.477097"
+
+ (code, body) = self.create(req_again)
+ self.assertEqual(code, HTTP_OK)
+ self.assert_href(body)
+
class TestResultGet(TestResultBase):
def test_getOne(self):