Commit 5997c51b authored by wenjie.zheng's avatar wenjie.zheng

testERP5Type.py: apply new workflow list's definition way.

parent 143bf846
...@@ -2491,14 +2491,17 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor): ...@@ -2491,14 +2491,17 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
def test_aq_reset_on_workflow_method_change(self): def test_aq_reset_on_workflow_method_change(self):
doc = self.portal.person_module.newContent(portal_type='Person') doc = self.portal.person_module.newContent(portal_type='Person')
self.getWorkflowTool().setChainForPortalTypes( #self.getWorkflowTool().setChainForPortalTypes(
['Person'], ('delivery_causality_workflow')) # ['Person'], ('delivery_causality_workflow'))
self.portal.portal_types._getOb('Person').addTypeWorkflowList('delivery_causality_workflow')
self.commit() self.commit()
self.assertTrue(hasattr(doc, 'diverge')) self.assertTrue(hasattr(doc, 'diverge'))
wf = self.portal.portal_workflow.delivery_causality_workflow wf = self.portal.portal_workflow.delivery_causality_workflow
#wf.transitions.addTransition('dummy_workflow_method') #wf.transitions.addTransition('dummy_workflow_method')
dummy_workflow_method = wf.newContent(id='dummy_workflow_method', portal_type='Transition') dummy_workflow_method = wf.newContent(portal_type='Transition')
dummy_workflow_method.setReference('dummy_workflow_method')
wf._setObject(dummy_workflow_method.getId(), dummy_workflow_method)
from Products.DCWorkflow.Transitions import TRIGGER_WORKFLOW_METHOD from Products.DCWorkflow.Transitions import TRIGGER_WORKFLOW_METHOD
dummy_workflow_method.edit( dummy_workflow_method.edit(
title='', destination='', trigger_type=TRIGGER_WORKFLOW_METHOD) title='', destination='', trigger_type=TRIGGER_WORKFLOW_METHOD)
......
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