Commit 8d519385 authored by wenjie.zheng's avatar wenjie.zheng Committed by Sebastien Robin

erp5_workflow_test_data: add test improvements.

parent 55f199aa
......@@ -26,8 +26,8 @@
<key> <string>erp5workflow_list</string> </key>
<value>
<tuple>
<string>testing_ingeraction_workflow_interactionworkflow</string>
<string>testing_workflow_workflow</string>
<string>interactionworkflow_testing_interaction_workflow</string>
<string>workflow_testing_workflow</string>
</tuple>
</value>
</item>
......
......@@ -63,7 +63,7 @@ class TestERP5WorkflowMixin(ERP5TypeTestCase):
# self.assertEqual(new_object.getDescription(), "After script was executed.")
### zwj: mechanism: validate => validate interaction =>
### setTitle => setTitle interaction => setDescription
self.assertEqual(new_object.getDescription(), "Interaction of setTitle executed.")
self.assertEqual(new_object.getDescription(), "'Interaction of setTitle executed. setTitle is appeared in after validate script.")
def test_02_testBeforeScript(self):
new_object = self.getTestObject()
......@@ -181,10 +181,10 @@ class TestERP5WorkflowMixin(ERP5TypeTestCase):
new_object = self.getTestObject()
new_object.setTitle('nana')
self.doActionFor(new_object, "validate_action")
self.assertEqual(new_object.getTitle(), "toto")
self.assertEqual(new_object.getTitle(), "After validate interaction.")
self.assertEqual(self.getStateFor(new_object), 'validated')
new_object.setTitle("tictic")
self.assertEqual(new_object.getDescription(), "Interaction of setTitle executed.")
self.assertEqual(new_object.getDescription(), "'Interaction of setTitle executed. setTitle is appeared in after validate script.")
def test_12_testIsTransitionPossible(self):
new_object = self.getTestObject()
......
......@@ -51,7 +51,7 @@
<item>
<key> <string>_body</string> </key>
<value> <string>document = state_change.object\n
document.setDescription(\'Interaction of setTitle executed.\')\n
document.setDescription(\'Interaction of setTitle executed. setTitle is appeared in after validate script.\')\n
</string> </value>
</item>
<item>
......
......@@ -51,7 +51,7 @@
<item>
<key> <string>_body</string> </key>
<value> <string>document = state_change[\'object\']\n
document.setTitle("toto")\n
document.setTitle("After validate interaction.")\n
</string> </value>
</item>
<item>
......
......@@ -51,7 +51,7 @@
<item>
<key> <string>_body</string> </key>
<value> <string>document = sci.object\n
document.setDescription(\'Interaction of setTitle executed.\')\n
document.setDescription(\'Interaction of setTitle executed. setTitle is appeared in after validate script.\')\n
</string> </value>
</item>
<item>
......
......@@ -46,6 +46,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 +81,12 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
</pickle>
<pickle>
<dictionary/>
</pickle>
</record>
</ZopeData>
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