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