diff options
author | Morgan Richomme <morgan.richomme@orange.com> | 2020-10-07 09:02:51 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-10-07 09:02:51 +0000 |
commit | d1d44781c7d03c8794dd626184f77d9836264212 (patch) | |
tree | c4fd34da2631a3a775612946841bd7149b664f8c /src/onaptests/steps/reports_collection.py | |
parent | 9cd3c4fef7b7e980321486bfd1a86366a2221a16 (diff) | |
parent | 84a44a0cf70e2e55a13e4e994836ee074b7039aa (diff) |
Merge "Collect steps execution result"
Diffstat (limited to 'src/onaptests/steps/reports_collection.py')
-rw-r--r-- | src/onaptests/steps/reports_collection.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/onaptests/steps/reports_collection.py b/src/onaptests/steps/reports_collection.py new file mode 100644 index 0000000..b61b571 --- /dev/null +++ b/src/onaptests/steps/reports_collection.py @@ -0,0 +1,35 @@ +from typing import Dict + + +class ReportsCollection: + """Collection to store steps execution statuses.""" + + def __init__(self) -> None: + """Initialize collection.""" + self._collection: list = [] + + def put(self, item: Dict[str, str]) -> None: + """Put execution status dictionary. + + Args: + item (Dict[str, str]): Step name with status dictionary + + """ + self._collection.append(item) + + @property + def report(self) -> Dict[str, str]: + """Get report. + + Build a dictionary with execution statuses. + + Returns: + Dict[str, str]: Steps name with status dictionary + + """ + report: Dict[str, str] = {} + for element in self._collection[::-1]: + print(element) + print(type(element)) + report.update(element) + return report |