diff --git a/tests/SpiffWorkflow/bpmn/CallActivityTest.py b/tests/SpiffWorkflow/bpmn/CallActivityTest.py index 73d8ad25..3dd29987 100644 --- a/tests/SpiffWorkflow/bpmn/CallActivityTest.py +++ b/tests/SpiffWorkflow/bpmn/CallActivityTest.py @@ -43,15 +43,15 @@ def test_call_activity_allows_removal_of_data(self): self.assertTrue(self.workflow.is_completed()) self.assertNotIn('remove_this_var', self.workflow.last_task.data.keys()) - def test_call_acitivity_errors_include_task_trace(self): + def test_call_activity_errors_include_task_trace(self): error_spec = self.subprocesses.get('ErroringBPMN') error_spec, subprocesses = self.load_workflow_spec('call_activity_*.bpmn', 'ErroringBPMN') with self.assertRaises(WorkflowTaskException) as context: self.workflow = BpmnWorkflow(error_spec, subprocesses) self.workflow.do_engine_steps() - self.assertEquals(2, len(context.exception.task_trace)) - self.assertRegexpMatches(context.exception.task_trace[0], 'Create Data \(.*?call_activity_call_activity.bpmn\)') - self.assertRegexpMatches(context.exception.task_trace[1], 'Get Data Call Activity \(.*?call_activity_with_error.bpmn\)') + self.assertEqual(2, len(context.exception.task_trace)) + self.assertRegex(context.exception.task_trace[0], 'Create Data \(.*?call_activity_call_activity.bpmn\)') + self.assertRegex(context.exception.task_trace[1], 'Get Data Call Activity \(.*?call_activity_with_error.bpmn\)') task = self.workflow.get_next_task(spec_name='Sub_Bpmn_Task') self.assertEqual(task.state, TaskState.ERROR) diff --git a/tests/SpiffWorkflow/bpmn/parallel_gateway_tests/ParallelOrderTest.py b/tests/SpiffWorkflow/bpmn/parallel_gateway_tests/ParallelOrderTest.py index e30e294a..6429204c 100644 --- a/tests/SpiffWorkflow/bpmn/parallel_gateway_tests/ParallelOrderTest.py +++ b/tests/SpiffWorkflow/bpmn/parallel_gateway_tests/ParallelOrderTest.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- - -import unittest - from SpiffWorkflow.bpmn.workflow import BpmnWorkflow from tests.SpiffWorkflow.bpmn.BpmnWorkflowTestCase import BpmnWorkflowTestCase @@ -22,13 +18,8 @@ def testRunThroughHappy(self): self.assertFalse(self.workflow.is_completed()) self.assertEqual(4, len(self.get_ready_user_tasks())) tasks = self.get_ready_user_tasks() - self.assertEquals("Task 1", tasks[0].task_spec.bpmn_name) - self.assertEquals("Task 2", tasks[1].task_spec.bpmn_name) - self.assertEquals("Task 3", tasks[2].task_spec.bpmn_name) - self.assertEquals("Task 4", tasks[3].task_spec.bpmn_name) - + self.assertEqual("Task 1", tasks[0].task_spec.bpmn_name) + self.assertEqual("Task 2", tasks[1].task_spec.bpmn_name) + self.assertEqual("Task 3", tasks[2].task_spec.bpmn_name) + self.assertEqual("Task 4", tasks[3].task_spec.bpmn_name) -def suite(): - return unittest.TestLoader().loadTestsFromTestCase(ParallelOrderTest) -if __name__ == '__main__': - unittest.TextTestRunner(verbosity=2).run(suite()) diff --git a/tests/SpiffWorkflow/camunda/ResetTokenParallelTaskCountTest.py b/tests/SpiffWorkflow/camunda/ResetTokenParallelTaskCountTest.py index 9d639878..77aa0e57 100644 --- a/tests/SpiffWorkflow/camunda/ResetTokenParallelTaskCountTest.py +++ b/tests/SpiffWorkflow/camunda/ResetTokenParallelTaskCountTest.py @@ -33,10 +33,10 @@ def actual_test(self, save_restore=False): task = self.get_ready_user_tasks()[0] task.data = data self.workflow.run_task_from_id(task.id) - self.assertEquals(total, len(self.workflow.get_tasks())) + self.assertEqual(total, len(self.workflow.get_tasks())) # Reset the token to the first user task. # We should still have the same number of tasks. task.reset_branch(data) - self.assertEquals(total, len(self.workflow.get_tasks())) - self.assertEquals(1, len(self.get_ready_user_tasks())) + self.assertEqual(total, len(self.workflow.get_tasks())) + self.assertEqual(1, len(self.get_ready_user_tasks())) diff --git a/tests/SpiffWorkflow/camunda/UserTaskParserTest.py b/tests/SpiffWorkflow/camunda/UserTaskParserTest.py index 263543ff..0c3b7fce 100644 --- a/tests/SpiffWorkflow/camunda/UserTaskParserTest.py +++ b/tests/SpiffWorkflow/camunda/UserTaskParserTest.py @@ -1,5 +1,3 @@ -import unittest - from tests.SpiffWorkflow.camunda.BaseTestCase import BaseTestCase @@ -38,10 +36,3 @@ def testNoFormDoesNotBombOut(self): def testCreateTask(self): pass - -def suite(): - return unittest.TestLoader().loadTestsFromTestCase(UserTaskParserTest) - - -if __name__ == '__main__': - unittest.TextTestRunner(verbosity=2).run(suite()) diff --git a/tests/SpiffWorkflow/camunda/specs/UserTaskSpecTest.py b/tests/SpiffWorkflow/camunda/specs/UserTaskSpecTest.py index 1d44371c..0ba41f86 100644 --- a/tests/SpiffWorkflow/camunda/specs/UserTaskSpecTest.py +++ b/tests/SpiffWorkflow/camunda/specs/UserTaskSpecTest.py @@ -111,14 +111,14 @@ def test_properties(self): self.assertFalse(form_field.has_property("wilma")) form_field.add_property("wilma", "flintstone") self.assertTrue(form_field.has_property("wilma")) - self.assertEquals("flintstone", form_field.get_property("wilma")) + self.assertEqual("flintstone", form_field.get_property("wilma")) def test_validations(self): form_field = FormField(form_type="text") self.assertFalse(form_field.has_validation("barney")) form_field.add_validation("barney", "rubble") self.assertTrue(form_field.has_validation("barney")) - self.assertEquals("rubble", form_field.get_validation("barney")) + self.assertEqual("rubble", form_field.get_validation("barney")) def testIsEngineTask(self): self.assertTrue(self.user_spec.manual)