def test_get_workflow_by_name_no_name(self): workflow = Workflow('wf_name', 0) playbook = Playbook('test', [workflow]) self.assertIsNone(playbook.get_workflow_by_name('invalid'))
def test_get_workflow_by_name(self): workflow = Workflow('wf_name', 0) playbook = Playbook('test', [workflow]) self.assertEqual(playbook.get_workflow_by_name('wf_name'), workflow)
def test_get_workflow_by_name_no_workflows(self): playbook = Playbook('test', []) self.assertIsNone(playbook.get_workflow_by_name('anything'))