From 568daae7c834117e8d8097e4309fe9252228b200 Mon Sep 17 00:00:00 2001
From: Nicolas Dumazet <nicolas.dumazet@nexedi.com>
Date: Fri, 16 Oct 2009 09:13:45 +0000
Subject: [PATCH] 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
---
 product/ERP5Type/tests/ERP5TypeTestCase.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/product/ERP5Type/tests/ERP5TypeTestCase.py b/product/ERP5Type/tests/ERP5TypeTestCase.py
index 8a13cd211c..0d9d95c0ca 100644
--- a/product/ERP5Type/tests/ERP5TypeTestCase.py
+++ b/product/ERP5Type/tests/ERP5TypeTestCase.py
@@ -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:
-- 
2.30.9