From 27b0a60dc802a6834bc9b2b51274d4016a4b0b7f Mon Sep 17 00:00:00 2001 From: Morgan Richomme Date: Wed, 25 May 2016 15:32:54 +0200 Subject: Test API add start_date, stop_date parameters in results Change-Id: I8c8c5b1d82e447fb7a7413368a919b3d3c7b99a6 Signed-off-by: Morgan Richomme --- utils/test/result_collection_api/tests/unit/test_result.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'utils/test/result_collection_api/tests/unit') 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 2ea1b6c11..9e27e3c3c 100644 --- a/utils/test/result_collection_api/tests/unit/test_result.py +++ b/utils/test/result_collection_api/tests/unit/test_result.py @@ -47,8 +47,10 @@ class TestResultBase(TestBase): self.version = 'C' self.build_tag = 'v3.0' self.scenario = 'odl-l2' - self.criteria = '10s' + self.criteria = 'passed' self.trust_indicator = 0.7 + self.start_date = "2016-05-23 07:16:09.477097" + self.stop_date = "2016-05-23 07:16:19.477097" super(TestResultBase, self).setUp() self.details = Details(timestart='0', duration='9s', status='OK') self.req_d = ResultCreateRequest(pod_name=self.pod, @@ -56,7 +58,8 @@ class TestResultBase(TestBase): case_name=self.case, installer=self.installer, version=self.version, - description='vping use ssh', + start_date=self.start_date, + stop_date=self.stop_date, details=self.details.format(), build_tag=self.build_tag, scenario=self.scenario, @@ -82,7 +85,6 @@ class TestResultBase(TestBase): self.assertEqual(result.case_name, req.case_name) self.assertEqual(result.installer, req.installer) self.assertEqual(result.version, req.version) - self.assertEqual(result.description, req.description) details_req = Details.from_dict(req.details) details_res = Details.from_dict(result.details) self.assertEqual(details_res.duration, details_req.duration) @@ -92,7 +94,8 @@ class TestResultBase(TestBase): self.assertEqual(result.scenario, req.scenario) self.assertEqual(result.criteria, req.criteria) self.assertEqual(result.trust_indicator, req.trust_indicator) - self.assertIsNotNone(result.creation_date) + self.assertIsNotNone(result.start_date) + self.assertIsNotNone(result.stop_date) self.assertIsNotNone(result._id) -- cgit 1.2.3-korg