def test_get_workflow_by_uid_no_workflows(self): playbook = Playbook('test', []) self.assertIsNone(playbook.get_workflow_by_uid('anything'))
def test_get_workflow_by_uid(self): workflow = MockWorkflow('uid', 'wf_name') playbook = Playbook('test', [workflow]) self.assertEqual(playbook.get_workflow_by_uid('uid'), workflow)
def test_get_workflow_by_uid_no_name(self): workflow = MockWorkflow('uid', 'wf_name') playbook = Playbook('test', [workflow]) self.assertIsNone(playbook.get_workflow_by_uid('invalid'))