Пример #1
0
 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'))
Пример #2
0
 def test_rename_workflow(self):
     workflows = [MockWorkflow(i, i + 1) for i in range(3)]
     playbook = Playbook('test', workflows)
     playbook.rename_workflow(3, 'new_name')
     self.assertTrue(playbook.has_workflow_name('new_name'))
     self.assertFalse(playbook.has_workflow_name(3))
Пример #3
0
 def test_rename_workflow_no_workflows(self):
     playbook = Playbook('test', [])
     playbook.rename_workflow('anything', 'renamed')
     self.assertDictEqual(playbook.workflows, {})