Example #1
0
 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 {}
Example #2
0
 def expected_events(self):
     if not self._deprecated_statedict:
         return ArsdkEventContext(
             [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()}
         }