Exemple #1
0
 def expected_events(self):
     if self._checked:
         return ArsdkEventContext(
             self._check_expectation.expected_events().events(), ExpectPolicy.check_wait)
     else:
         return ArsdkEventContext(
             self._wait_expectation.expected_events().events(), ExpectPolicy.check_wait)
Exemple #2
0
 def unmatched_events(self):
     if self._checked:
         return ArsdkEventContext(
             self._check_expectation.unmatched_events().events())
     else:
         return ArsdkEventContext(
             self._wait_expectation.unmatched_events().events())
Exemple #3
0
 def received_events(self):
     if not self._deprecated_statedict:
         if not self._received_events:
             return ArsdkEventContext()
         return ArsdkEventContext(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]
         }
Exemple #4
0
 def unmatched_events(self):
     if not self._deprecated_statedict:
         if not self._success:
             return ArsdkEventContext(self.expected_events().events())
         else:
             return ArsdkEventContext()
     else:
         if not self._success:
             return self.expected_events()
         else:
             return {}
Exemple #5
0
 def unmatched_events(self):
     if not self._deprecated_statedict:
         if not self._success:
             return ArsdkEventContext([ArsdkMessageEvent(
                 self.expected_message,
                 self.matched_state)]
             )
         else:
             return ArsdkEventContext()
     else:
         if not self._success:
             return {
                 self.expected_message.FULL_NAME:
                 {k.upper(): v for k, v in self.matched_state.items()}
             }
         else:
             return {}
Exemple #6
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()}
         }
Exemple #7
0
 def received_events(self):
     return ArsdkEventContext() if not self._deprecated_statedict else {}