Commit 7ea5360f authored by wenjie.zheng's avatar wenjie.zheng

testERP5Type.py: compatibility related modification.

parent 052f4885
......@@ -2499,13 +2499,16 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
wf.addTransition('dummy_workflow_method')
from Products.DCWorkflow.Transitions import TRIGGER_WORKFLOW_METHOD
wf.transitions.dummy_workflow_method.setProperties(
if wf.getPortalType() == 'Workflow':
wf._getOb('transition_dummy_workflow_method').setTriggerType(TRIGGER_WORKFLOW_METHOD)
else:
wf.transitions.dummy_workflow_method.setProperties(
title='', new_state_id='', trigger_type=TRIGGER_WORKFLOW_METHOD)
self.commit()
self.assertTrue(hasattr(doc, 'dummyWorkflowMethod'))
wf.transitions.deleteTransitions(['dummy_workflow_method'])
wf.deleteTransitions(['dummy_workflow_method'])
self.commit()
self.assertFalse(hasattr(doc, 'dummyWorkflowMethod'))
......
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