Beispiel #1
0
 def test_not_firing_named_event_with_continue_aborts_event_execution(
         self, _, Event):
     Event().wait.side_effect = TimeoutError
     ac = control.WaitEventAction("OtherEvent", "5", "continue")
     with self.assertRaises(AbortEventExecution):
         ac(EVENT_ID, EVENT_EXTRA)
Beispiel #2
0
 def test_firing_named_event_with_continue_continues_event_execution(
         self, _, Event):
     Event().wait.return_value = True
     ac = control.WaitEventAction("OtherEvent", "5", "continue")
     with assert_no_raise(self, cls=AbortEventExecution):
         ac(EVENT_ID, EVENT_EXTRA)
Beispiel #3
0
 def test_firing_named_event_with_abort_aborts_event_execution(
         self, _, Event):
     Event().wait.return_value = True
     ac = control.WaitEventAction("OtherEvent", "5", "abort")
     with self.assertRaises(AbortEventExecution):
         ac(EVENT_ID, EVENT_EXTRA)
Beispiel #4
0
 def test_not_firing_named_event_with_abort_continues_event_execution(
         self, _, Event):
     Event().wait.side_effect = TimeoutError
     ac = control.WaitEventAction("OtherEvent", "5", "abort")
     with assert_no_raise(self, cls=AbortEventExecution):
         ac(EVENT_ID, EVENT_EXTRA)
Beispiel #5
0
 def test_action_waits_for_the_specified_amount_of_time_if_no_events_are_fired(
         self, _, Event):
     Event().wait.return_value = True
     ac = control.WaitEventAction("OtherEvent", "5", "continue")
     ac(EVENT_ID, EVENT_EXTRA)
     Event().wait.assert_called_with(5.0)