Commit 568daae7 authored by Nicolas Dumazet's avatar Nicolas Dumazet

self.workflow_tool is *not* defined in ERP5TypeTestCase or in parent classes.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29734 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b222c538
......@@ -646,10 +646,11 @@ class ERP5TypeTestCase(PortalTestCase):
If error_message is provided, it is asserted to be equal to the last
workflow history error message.
"""
reference_history_length = len(self.workflow_tool.getInfoFor(ob=object, name='history', wf_id=workflow_id))
workflow_tool = self.getWorkflowTool()
reference_history_length = len(workflow_tool.getInfoFor(ob=object, name='history', wf_id=workflow_id))
reference_workflow_state = object.getSimulationState()
self.assertRaises(ValidationFailed, self.workflow_tool.doActionFor, object, transition_id, wf_id=workflow_id)
workflow_history = self.workflow_tool.getInfoFor(ob=object, name='history', wf_id=workflow_id)
self.assertRaises(ValidationFailed, workflow_tool.doActionFor, object, transition_id, wf_id=workflow_id)
workflow_history = workflow_tool.getInfoFor(ob=object, name='history', wf_id=workflow_id)
self.assertEqual(len(workflow_history), reference_history_length + 1)
workflow_error_message = str(workflow_history[-1]['error_message'])
if error_message is not None:
......
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