Commit 012f8b89 authored by Vincent Pelletier's avatar Vincent Pelletier

Forgot to update variable name of object on which the transition is passed.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13519 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 88cf60a9
...@@ -500,10 +500,10 @@ class ERP5TypeTestCase(PortalTestCase): ...@@ -500,10 +500,10 @@ class ERP5TypeTestCase(PortalTestCase):
If error_message is provided, it is asserted to be equal to the last If error_message is provided, it is asserted to be equal to the last
workflow history error message. workflow history error message.
""" """
reference_history_length = len(self.workflow_tool.getInfoFor(ob=self.account_incident, name='history', wf_id=workflow_id)) reference_history_length = len(self.workflow_tool.getInfoFor(ob=object, name='history', wf_id=workflow_id))
reference_workflow_state = object.getSimulationState() reference_workflow_state = object.getSimulationState()
self.assertRaises(ValidationFailed, self.workflow_tool.doActionFor, self.account_incident, transition_id, wf_id=workflow_id) self.assertRaises(ValidationFailed, self.workflow_tool.doActionFor, object, transition_id, wf_id=workflow_id)
workflow_history = self.workflow_tool.getInfoFor(ob=self.account_incident, name='history', wf_id=workflow_id) workflow_history = self.workflow_tool.getInfoFor(ob=object, name='history', wf_id=workflow_id)
self.assertEqual(len(workflow_history), reference_history_length + 1) self.assertEqual(len(workflow_history), reference_history_length + 1)
if error_message is not None: if error_message is not None:
self.assertEqual(str(workflow_history[-1]['error_message']), error_message) self.assertEqual(str(workflow_history[-1]['error_message']), error_message)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment