summaryrefslogtreecommitdiffstats
path: root/utils/test/result_collection_api/resources/models.py
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-03-17 14:54:25 +0100
committerMorgan Richomme <morgan.richomme@orange.com>2016-03-17 14:57:38 +0100
commit99b87507be5510bc49d5cdb7a2cbd64edbb476af (patch)
treee89ec30c8323ed876cffb9a78c28a37b2043813e /utils/test/result_collection_api/resources/models.py
parent3e1340047508bc0589bdd4569974b20d26319a39 (diff)
Add scenario and criteria field in the Test result object of the test API
scenario will be used for OPNFV scenario (currently using version field) criteria will be passed or failed to give an immediate feedback on the test result status JIRA: FUNCTEST-151 Change-Id: Iff5eb66bbf0cfbaafec0c3a6211031f6eb83c34f Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'utils/test/result_collection_api/resources/models.py')
-rw-r--r--utils/test/result_collection_api/resources/models.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/utils/test/result_collection_api/resources/models.py b/utils/test/result_collection_api/resources/models.py
index 6f9386208..35b6af11f 100644
--- a/utils/test/result_collection_api/resources/models.py
+++ b/utils/test/result_collection_api/resources/models.py
@@ -151,6 +151,8 @@ class TestResult:
self.creation_date = None
self.details = None
self.build_tag = None
+ self.scenario = None
+ self.criteria = None
@staticmethod
def test_result_from_dict(test_result_dict):
@@ -169,6 +171,8 @@ class TestResult:
t.version = test_result_dict.get('version')
t.installer = test_result_dict.get('installer')
t.build_tag = test_result_dict.get('build_tag')
+ t.scenario = test_result_dict.get('scenario')
+ t.criteria = test_result_dict.get('criteria')
return t
@@ -182,7 +186,9 @@ class TestResult:
"version": self.version,
"installer": self.installer,
"details": self.details,
- "build_tag": self.build_tag
+ "build_tag": self.build_tag,
+ "scenario": self.scenario,
+ "criteria": self.criteria
}
def format_http(self):
@@ -196,6 +202,8 @@ class TestResult:
"version": self.version,
"installer": self.installer,
"details": self.details,
- "build_tag": self.build_tag
+ "build_tag": self.build_tag,
+ "scenario": self.scenario,
+ "criteria": self.criteria
}