Commit 22d5ee18 authored by wenjie.zheng's avatar wenjie.zheng Committed by Sebastien Robin

testERP5Workflow.py: modification correspond to the null prefix.

parent e659ab64
...@@ -76,7 +76,7 @@ class TestERP5Workflow(ERP5TypeTestCase): ...@@ -76,7 +76,7 @@ class TestERP5Workflow(ERP5TypeTestCase):
# set initial state # set initial state
workflow.setSourceValue(s1) workflow.setSourceValue(s1)
# create a document and associate it to this workflow # create a document and associate it to this workflow
self.getPortalObject().portal_types._getOb('Folder').edit(type_workflow_list=('workflow_wf')) self.getPortalObject().portal_types._getOb('Folder').edit(type_workflow_list=('wf'))
doc = self.portal.newContent(portal_type='Folder', id='test_doc') doc = self.portal.newContent(portal_type='Folder', id='test_doc')
self.assertEqual('s1', workflow._getWorkflowStateOf(doc, id_only=1)) self.assertEqual('s1', workflow._getWorkflowStateOf(doc, id_only=1))
...@@ -103,7 +103,7 @@ class TestERP5Workflow(ERP5TypeTestCase): ...@@ -103,7 +103,7 @@ class TestERP5Workflow(ERP5TypeTestCase):
t2.setReference('t2') t2.setReference('t2')
s1.setDestinationValueList([t1, t2]) s1.setDestinationValueList([t1, t2])
self.getPortalObject().portal_types._getOb('Folder').edit(type_workflow_list=('workflow_wf')) self.getPortalObject().portal_types._getOb('Folder').edit(type_workflow_list=('wf'))
doc = self.portal.newContent(portal_type='Folder', id='test_doc') doc = self.portal.newContent(portal_type='Folder', id='test_doc')
self.assertEqual([t1, t2], s1.getDestinationValueList()) self.assertEqual([t1, t2], s1.getDestinationValueList())
...@@ -127,7 +127,7 @@ class TestERP5Workflow(ERP5TypeTestCase): ...@@ -127,7 +127,7 @@ class TestERP5Workflow(ERP5TypeTestCase):
title='actor') title='actor')
v1.setReference('actor') v1.setReference('actor')
v1.default_expr = 'user/getUserName' v1.default_expr = 'user/getUserName'
self.getPortalObject().portal_types._getOb('Folder').edit(type_workflow_list=('workflow_wf')) self.getPortalObject().portal_types._getOb('Folder').edit(type_workflow_list=('wf'))
doc = self.portal.newContent(portal_type='Folder', id='test_doc') doc = self.portal.newContent(portal_type='Folder', id='test_doc')
workflow._executeTransition(doc,t1) workflow._executeTransition(doc,t1)
current_state = workflow.getCurrentStatusDict(doc) current_state = workflow.getCurrentStatusDict(doc)
...@@ -162,7 +162,7 @@ class TestERP5Workflow(ERP5TypeTestCase): ...@@ -162,7 +162,7 @@ class TestERP5Workflow(ERP5TypeTestCase):
script.setParameterSignature("state_change") script.setParameterSignature("state_change")
script.setParameterSignature("state_change") script.setParameterSignature("state_change")
script.setBody("state_change['object'].setDescription('After script was executed.')") script.setBody("state_change['object'].setDescription('After script was executed.')")
self.getPortalObject().portal_types._getOb('Folder').edit(type_workflow_list=('workflow_wf')) self.getPortalObject().portal_types._getOb('Folder').edit(type_workflow_list=('wf'))
doc = self.portal.newContent(portal_type='Folder', id='test_doc') doc = self.portal.newContent(portal_type='Folder', id='test_doc')
workflow._executeTransition(doc, t1) workflow._executeTransition(doc, t1)
...@@ -193,7 +193,7 @@ class TestERP5Workflow(ERP5TypeTestCase): ...@@ -193,7 +193,7 @@ class TestERP5Workflow(ERP5TypeTestCase):
script.setParameterSignature("state_change") script.setParameterSignature("state_change")
script.setBody("state_change['object'].setDescription('Before script was executed.')") script.setBody("state_change['object'].setDescription('Before script was executed.')")
self.getPortalObject().portal_types._getOb('Folder').edit(type_workflow_list=('workflow_wf')) self.getPortalObject().portal_types._getOb('Folder').edit(type_workflow_list=('wf'))
doc = self.portal.newContent(portal_type='Folder', id='test_doc') doc = self.portal.newContent(portal_type='Folder', id='test_doc')
workflow._executeTransition(doc, t1) workflow._executeTransition(doc, t1)
......
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