Commit 3a625816 authored by wenjie.zheng's avatar wenjie.zheng

erp5_workflow_test_data: Add action_url in user action.

parent 62f23b36
......@@ -48,6 +48,12 @@
<none/>
</value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>guard_expression</string> </key>
<value> <string>python: True</string> </value>
......@@ -81,4 +87,23 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>roles</string> </key>
<value>
<list>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -18,9 +18,7 @@
</item>
<item>
<key> <string>actbox_url</string> </key>
<value>
<none/>
</value>
<value> <string>python:${object_url}/Base_viewWorkflowActionDialog?workflow_action=invalidate_action</string> </value>
</item>
<item>
<key> <string>after_script_id</string> </key>
......@@ -42,6 +40,12 @@
<none/>
</value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>guard_expression</string> </key>
<value> <string>python: True</string> </value>
......@@ -75,4 +79,23 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>roles</string> </key>
<value>
<list>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -18,9 +18,7 @@
</item>
<item>
<key> <string>actbox_url</string> </key>
<value>
<none/>
</value>
<value> <string>%(content_url)s/Base_viewWorkflowActionDialog?workflow_action=validate_action</string> </value>
</item>
<item>
<key> <string>after_script_id</string> </key>
......@@ -52,6 +50,12 @@
<key> <string>groups</string> </key>
<value> <string>()</string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>guard_expression</string> </key>
<value> <string>python: True</string> </value>
......@@ -98,4 +102,23 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>roles</string> </key>
<value>
<list>
<string>Assignor</string>
<string>Assignee</string>
<string>Manager</string>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -21,7 +21,9 @@
<item>
<key> <string>erp5workflow_list</string> </key>
<value>
<tuple/>
<tuple>
<string>testing_workflow</string>
</tuple>
</value>
</item>
<item>
......
......@@ -81,12 +81,30 @@ class TestERP5WorkflowMixin(ERP5TypeTestCase):
last_history = history_list[-1]
self.assertEqual(last_history.get("error_message", None), "foo error")
def test_08_testUserActionDisplay(self):
new_object = self.getTestObject()
object_pt = new_object.getTypeInfo()
self.assertTrue(hasattr(object_pt, 'validate'))
self.doActionFor(new_object, "validate")
self.assertTrue(hasattr(object_pt, 'invalidate'))
### Doesn't exist yet
def _testSimpleWorklist(self):
pass
def _testWorklistWithAnAssignee(self):
pass
def beforeTearDown(self):
self.portal = self.getPortal()
self.getWorkflowTool().setChainForPortalTypes(['ERP5Workflow Test Document'], ())
self.workflow_module = self.portal.workflow_module
self.wf = self.workflow_module._getOb('testing_workflow')
type_test_object = self.portal.portal_types._getOb('ERP5Workflow Test Document')
type_test_object.edit(type_base_category_list=('validation_state',))
type_test_object.edit(type_erp5workflow_list=('testing_workflow',))
self.getWorkflowTool().setChainForPortalTypes(['ERP5Workflow Test Document'], ())
class TestERP5Workflow(TestERP5WorkflowMixin):
"""
Tests ERP5 Workflow.
......
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