def test_stop_from_running_with_workflows(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.stop()
     self.assertEqual(task.status, 'stopped')
     self.assertSchedulerWorkflowsRunningEqual(workflows=None)
 def test_stop_from_stopped(self):
     task = ScheduledTask(name='test')
     task.stop()
     self.assertEqual(task.status, 'stopped')
 def test_stop_from_running_no_workflows(self):
     task = ScheduledTask(name='test', status='running')
     task.stop()
     self.assertEqual(task.status, 'stopped')
     self.assertSchedulerWorkflowsRunningEqual(workflows=None)