def matched_events(self): if not self._deprecated_statedict: if self._success: if not self.matched_state: return EventContext() return EventContext( [ ArsdkMessageEvent( self.expected_message, self.matched_state, ExpectPolicy.check, ) ] ) else: return EventContext() else: if self._success: return { self.expected_message.FULL_NAME: { k.upper(): v for k, v in self.matched_state.items() } } else: return {}
def unmatched_events(self): if self._checked: return EventContext( self._check_expectation.unmatched_events().events()) else: return EventContext( self._wait_expectation.unmatched_events().events())
def expected_events(self): if self._checked: return EventContext( self._check_expectation.expected_events().events(), ExpectPolicy.check_wait, ) else: return EventContext( self._wait_expectation.expected_events().events(), ExpectPolicy.check_wait, )
def unmatched_events(self): if not self._deprecated_statedict: if not self._success: return EventContext(self.expected_events().events()) else: return EventContext() else: if not self._success: return self.expected_events() else: return {}
def received_events(self): if not self._deprecated_statedict: if not self._received_events: return EventContext() return EventContext(self._received_events[:]) else: return { self.expected_message.FULL_NAME: [{k.upper(): v for k, v in args.items()} for args in self.received_args] }
def expected_events(self): if not self._deprecated_statedict: return EventContext( [ArsdkMessageEvent(self.expected_message, self.expected_args)]) else: return { self.expected_message.FULL_NAME: {k.upper(): v for k, v in self.expected_args.items()} }
def received_events(self): return EventContext() if not self._deprecated_statedict else {}