Ejemplo n.º 1
0
 def test_validate_events_all_events_specified_available_events(self):
     available_events = (WalkoffEvent.CommonWorkflowSignal,
                         WalkoffEvent.SchedulerStart)
     self.assertSetEqual(validate_events(allowed_events=available_events),
                         set(available_events))
 def test_validate_events_single_invalid_event(self):
     with self.assertRaises(UnknownEvent):
         validate_events(events=WalkoffEvent.CommonWorkflowSignal,
                         allowed_events=(WalkoffEvent.SchedulerStart,))
Ejemplo n.º 3
0
 def test_validate_events_all_events_default_available_events(self):
     self.assertEqual(validate_events(), set(WalkoffEvent))
 def test_validate_events_no_available_events(self):
     with self.assertRaises(UnknownEvent):
         validate_events(events=[WalkoffEvent.CommonWorkflowSignal], allowed_events=[])
 def test_validate_events_too_few_events(self):
     self.assertSetEqual(validate_events(events=WalkoffEvent.CommonWorkflowSignal),
                         {WalkoffEvent.CommonWorkflowSignal})
 def test_validate_events_all_events_specified_available_events(self):
     available_events = (WalkoffEvent.CommonWorkflowSignal, WalkoffEvent.SchedulerStart)
     self.assertSetEqual(validate_events(allowed_events=available_events), set(available_events))
 def test_validate_events_no_events(self):
     self.assertSetEqual(set(validate_events(events=[])), set())
 def test_validate_events_all_events_default_available_events(self):
     self.assertEqual(validate_events(), set(WalkoffEvent))
Ejemplo n.º 9
0
 def test_validate_events_single_invalid_event(self):
     with self.assertRaises(UnknownEvent):
         validate_events(events=WalkoffEvent.CommonWorkflowSignal,
                         allowed_events=(WalkoffEvent.SchedulerStart, ))
Ejemplo n.º 10
0
 def test_validate_events_too_few_events(self):
     self.assertSetEqual(
         validate_events(events=WalkoffEvent.CommonWorkflowSignal),
         {WalkoffEvent.CommonWorkflowSignal})
Ejemplo n.º 11
0
 def test_validate_events_no_available_events(self):
     with self.assertRaises(UnknownEvent):
         validate_events(events=[WalkoffEvent.CommonWorkflowSignal],
                         allowed_events=[])
Ejemplo n.º 12
0
 def test_validate_events_no_events(self):
     self.assertSetEqual(set(validate_events(events=[])), set())