from typing import Dict from structure import IperfResult, StandardTest class TestStore: def __init__(self): self.inbound: Dict[str, IperfResult] = dict() self.outbound: Dict[str, IperfResult] = dict() def save_inbound(self, test: StandardTest, result: IperfResult): self.inbound[test.name()] = result def save_outbound(self, test: StandardTest, result: IperfResult): self.outbound[test.name()] = result def get_inbound(self, test: StandardTest) -> IperfResult: return self.inbound[test.name()] def get_outbound(self, test: StandardTest) -> IperfResult: return self.outbound[test.name()]