def test_rename_workflow_not_found(self): workflows = [MockWorkflow(i, i + 1) for i in range(3)] playbook = Playbook('test', workflows) playbook.rename_workflow('invalid', 'new_name') self.assertTrue(all( playbook.has_workflow_uid(uid) for uid in range(3))) self.assertFalse(playbook.has_workflow_name('invalid'))
def test_has_workflow_uid_no_uid(self): workflow = MockWorkflow('uid', 'wf_name') playbook = Playbook('test', [workflow]) self.assertFalse(playbook.has_workflow_uid('invalid'))
def test_has_workflow_uid_no_workflows(self): playbook = Playbook('test', []) self.assertFalse(playbook.has_workflow_uid('anything'))