def test_start_from_stopped_with_trigger(self):
     workflows = ['a', 'b', 'c', 'd']
     self.patch_controller_workflows(workflows)
     task = ScheduledTask(name='test', task_trigger=self.date_trigger, workflows=['b', 'c', 'd'])
     task.start()
     self.assertEqual(task.status, 'running')
     self.assertSchedulerWorkflowsRunningEqual(['b', 'c', 'd'])
 def test_start_from_stopped_unspecified_trigger(self):
     task = ScheduledTask(name='test')
     task.start()
     self.assertEqual(task.status, 'running')
     self.assertSchedulerWorkflowsRunningEqual(workflows=None)
 def test_start_from_running(self):
     task = ScheduledTask(name='test', status='running')
     task.start()
     self.assertEqual(task.status, 'running')
     self.assertSchedulerWorkflowsRunningEqual(workflows=None)