def test_remove_workflow_by_name(self): workflows = [Workflow(str(i), 0) for i in range(3)] playbook = Playbook('test', workflows) playbook.remove_workflow_by_name('2') self.assertEqual(len(playbook.workflows), 2) self.assertFalse(playbook.has_workflow_name('2'))
def test_remove_workflow_by_name_workflow_not_found(self): workflows = [Workflow(str(i), 0) for i in range(3)] playbook = Playbook('test', workflows) playbook.remove_workflow_by_name('invalid') self.assertEqual(len(playbook.workflows), 3)
def test_remove_workflow_by_name_no_workflows(self): playbook = Playbook('test', []) playbook.remove_workflow_by_name('something') self.assertListEqual(playbook.workflows, [])
def test_remove_workflow_by_name(self): workflows = [Workflow(str(i), 0) for i in range(3)] playbook = Playbook('test', workflows) playbook.remove_workflow_by_name('2') self.assertEqual(len(playbook.workflows), 2) self.assertFalse(playbook.has_workflow_name('2'))
def test_remove_workflow_by_name_workflow_not_found(self): workflows = [Workflow(str(i), 0) for i in range(3)] playbook = Playbook('test', workflows) playbook.remove_workflow_by_name('invalid') self.assertEqual(len(playbook.workflows), 3)
def test_remove_workflow_by_name_no_workflows(self): playbook = Playbook('test', []) playbook.remove_workflow_by_name('something') self.assertListEqual(playbook.workflows, [])