Commit 4616beab authored by Jérome Perrin's avatar Jérome Perrin

tests for mass workflow actions

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17966 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent aee842e8
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>Test Folder Workflow Action</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">Test Folder Workflow Action</td></tr>\n
</thead><tbody>\n
<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" />\n
<tr>\n
<td>open</td>\n
<td tal:content="string:${here/portal_url}/foo_module/1/Foo_validate">Validate the first document</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Validated</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/FooModule_createObjects?num:int=2&amp;start:int=2</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Created Successfully.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/Zuite_waitForActivities</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Done.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td tal:content="string: ${here/portal_url}/foo_module/view">/erp5/foo_module/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>select_action</td>\n
<td>Workflow</td>\n
</tr>\n
\n
<!-- we have a listbox with 2 lines, one for 2 Draft Foos, the other for 1\n
Validated Foo -->\n
<tr>\n
<td>assertText</td>\n
<td>listbox_record_number</td>\n
<td>2 record(s)</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[1]/a</td>\n
<td>2</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[2]/a</td>\n
<td>Foo</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[3]/a</td>\n
<td>Draft</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[4]/a</td>\n
<td>Foo Workflow</td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[5]/select</td>\n
<td>label=Validate Action</td>\n
</tr>\n
\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_1\']/td[1]/a</td>\n
<td>1</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_1\']/td[2]/a</td>\n
<td>Foo</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_1\']/td[3]/a</td>\n
<td>Validated</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_1\']/td[4]/a</td>\n
<td>Foo Workflow</td>\n
</tr>\n
\n
<tr>\n
<td>type</td>\n
<td>field_your_comment</td>\n
<td>Comment !</td>\n
</tr>\n
\n
<tr>\n
<td>clickAndWait</td>\n
<td>Base_callDialogMethod:method</td>\n
<td></td>\n
</tr>\n
\n
<!-- Now we are on a listbox showing *all* documents we are about to process.\n
Note that if a document cannot be processed, it\'s not shown in this list\n
-->\n
<tr>\n
<td>assertText</td>\n
<td>listbox_record_number</td>\n
<td>2 record(s)</td>\n
</tr>\n
<!-- This listbox is a proxy to the module listbox, so it has the same title\n
and the same columns. -->\n
<tr>\n
<td>assertText</td>\n
<td>listbox_title</td>\n
<td>exact:Foos:</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[2]</td>\n
<td>Title 2</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[4]</td>\n
<td>Validate Action</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_1\']/td[2]</td>\n
<td>Title 3</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_1\']/td[4]</td>\n
<td>Validate Action</td>\n
</tr>\n
\n
<tr>\n
<td>assertValue</td>\n
<td>field_your_comment</td>\n
<td>Comment !</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>Base_callDialogMethod:method</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>assertPortalStatusMessage</td>\n
<td>Workflow Modification in Progress</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/Zuite_waitForActivities</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Done.</td>\n
<td></td>\n
</tr>\n
<!-- We\'ll check everything else (workflow history, comments, etc) in a python\n
script. -->\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/Zuite_testFolderWorkflowActionCheckWorkflowHistory</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>result</td>\n
<td>OK</td>\n
</tr>\n
\n
\n
</body>\n
</html>\n
]]></string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testFolderWorkflowAction</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>Test Folder Workflow Action</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">Test Folder Workflow Action</td></tr>\n
</thead><tbody>\n
<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" />\n
<tr>\n
<td>open</td>\n
<td tal:content="string:${here/portal_url}/foo_module/1/Foo_validate">Validate the first document</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Validated</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/FooModule_createObjects?num:int=2&amp;start:int=2</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Created Successfully.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/ListBoxZuite_waitForActivities</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Done.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td tal:content="string: ${here/portal_url}/foo_module/view">/erp5/foo_module/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>title</td>\n
<td>%3</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>hidden_button</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>selectAndWait</td>\n
<td>select_action</td>\n
<td>Workflow</td>\n
</tr>\n
\n
<!-- we have a listbox with 1 line, for 1 Draft Foo -->\n
<tr>\n
<td>assertText</td>\n
<td>listbox_record_number</td>\n
<td>1 record(s)</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[1]/a</td>\n
<td>1</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[2]/a</td>\n
<td>Foo</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[3]/a</td>\n
<td>Draft</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[4]/a</td>\n
<td>Foo Workflow</td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[5]/select</td>\n
<td>label=Validate Action</td>\n
</tr>\n
\n
<tr>\n
<td>type</td>\n
<td>field_your_comment</td>\n
<td>Comment !</td>\n
</tr>\n
\n
<tr>\n
<td>clickAndWait</td>\n
<td>Base_callDialogMethod:method</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>assertText</td>\n
<td>listbox_record_number</td>\n
<td>1 record(s)</td>\n
</tr>\n
\n
<tr>\n
<td>clickAndWait</td>\n
<td>Base_callDialogMethod:method</td>\n
<td></td>\n
</tr>\n
\n
\n
<tr>\n
<td>assertPortalStatusMessage</td>\n
<td>Workflow Modification in Progress</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/Zuite_waitForActivities</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Done.</td>\n
<td></td>\n
</tr>\n
<!-- We\'ll check everything else (workflow history, comments, etc) in a python\n
script. -->\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/Zuite_testFolderWorkflowActionFilteredSelectionCheckWorkflowHistory</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>result</td>\n
<td>OK</td>\n
</tr>\n
\n
\n
</body>\n
</html>\n
]]></string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testFolderWorkflowActionFilteredSelection</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>Test Folder Workflow Action, multiple actions</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">Test Folder Workflow Action, multiple actions</td></tr>\n
</thead><tbody>\n
<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" />\n
<tr>\n
<td>open</td>\n
<td tal:content="string:${here/portal_url}/foo_module/1/Foo_validate">Validate the first document</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Validated</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/FooModule_createObjects?num:int=2&amp;start:int=2</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Created Successfully.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/Zuite_waitForActivities</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Done.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td tal:content="string: ${here/portal_url}/foo_module/view">/erp5/foo_module/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>select_action</td>\n
<td>Workflow</td>\n
</tr>\n
\n
<!-- we have a listbox with 2 lines, one for 2 Draft Foos, the other for 1\n
Validated Foo -->\n
<tr>\n
<td>assertText</td>\n
<td>listbox_record_number</td>\n
<td>2 record(s)</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[1]/a</td>\n
<td>2</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[2]/a</td>\n
<td>Foo</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[3]/a</td>\n
<td>Draft</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[4]/a</td>\n
<td>Foo Workflow</td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[5]/select</td>\n
<td>label=Validate Action</td>\n
</tr>\n
\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_1\']/td[1]/a</td>\n
<td>1</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_1\']/td[2]/a</td>\n
<td>Foo</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_1\']/td[3]/a</td>\n
<td>Validated</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_1\']/td[4]/a</td>\n
<td>Foo Workflow</td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//tr[@id=\'listbox_data_line_1\']/td[5]/select</td>\n
<td>label=Invalidate Action</td>\n
</tr>\n
\n
<tr>\n
<td>type</td>\n
<td>field_your_comment</td>\n
<td>Comment !</td>\n
</tr>\n
\n
<tr>\n
<td>clickAndWait</td>\n
<td>Base_callDialogMethod:method</td>\n
<td></td>\n
</tr>\n
\n
<!-- Now we are on a listbox showing *all* documents we are about to process.\n
Note that if a document cannot be processed, it\'s not shown in this list\n
-->\n
<tr>\n
<td>assertText</td>\n
<td>listbox_record_number</td>\n
<td>3 record(s)</td>\n
</tr>\n
<!-- This listbox is a proxy to the module listbox, so it has the same title\n
and the same columns. -->\n
<tr>\n
<td>assertText</td>\n
<td>listbox_title</td>\n
<td>exact:Foos:</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[2]</td>\n
<td>Title 2</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[4]</td>\n
<td>Validate Action</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_1\']/td[2]</td>\n
<td>Title 3</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_1\']/td[4]</td>\n
<td>Validate Action</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_2\']/td[2]</td>\n
<td>Title 1</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_2\']/td[4]</td>\n
<td>Invalidate Action</td>\n
</tr>\n
\n
<tr>\n
<td>assertValue</td>\n
<td>field_your_comment</td>\n
<td>Comment !</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>Base_callDialogMethod:method</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>assertPortalStatusMessage</td>\n
<td>Workflow Modification in Progress</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/Zuite_waitForActivities</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Done.</td>\n
<td></td>\n
</tr>\n
<!-- We\'ll check everything else (workflow history, comments, etc) in a python\n
script. -->\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/Zuite_testFolderWorkflowActionMultipleActionsCheckWorkflowHistory</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>result</td>\n
<td>OK</td>\n
</tr>\n
\n
\n
</body>\n
</html>\n
]]></string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testFolderWorkflowActionMultipleActions</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
from Products.CMFCore.utils import getToolByName\n
\n
foo_module = context.getPortalObject().foo_module\n
wtool = getToolByName(context, \'portal_workflow\')\n
\n
result = \'OK\'\n
error_list = []\n
\n
def assertEquals(a, b, msg=\'\'):\n
if a != b:\n
if msg:\n
error_list.append(msg)\n
else:\n
error_list.append(\'%r != %r\' % (a, b))\n
\n
foo_2 = foo_module[\'2\']\n
assertEquals(foo_2.getSimulationState(), \'validated\', \n
\'Foo 2 state is %s\' % foo_2.getSimulationState())\n
if not error_list:\n
assertEquals(\n
wtool.getInfoFor(foo_2, \'history\', wf_id=\'foo_workflow\')[-2][\'comment\'],\n
\'Comment !\')\n
\n
foo_3 = foo_module[\'3\']\n
assertEquals(foo_3.getSimulationState(), \'validated\', \n
\'Foo 3 state is %s\' % foo_3.getSimulationState())\n
if not error_list:\n
assertEquals(\n
wtool.getInfoFor(foo_3, \'history\', wf_id=\'foo_workflow\')[-2][\'comment\'],\n
\'Comment !\')\n
\n
if error_list:\n
result = \'\'.join(error_list)\n
\n
return \'<html><body><span id="result">%s</span></body></html>\' % result\n
]]></string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>Products.CMFCore.utils</string>
<string>getToolByName</string>
<string>_getattr_</string>
<string>context</string>
<string>foo_module</string>
<string>wtool</string>
<string>result</string>
<string>error_list</string>
<string>assertEquals</string>
<string>_getitem_</string>
<string>foo_2</string>
<string>foo_3</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Zuite_testFolderWorkflowActionCheckWorkflowHistory</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
from Products.CMFCore.utils import getToolByName\n
\n
foo_module = context.getPortalObject().foo_module\n
wtool = getToolByName(context, \'portal_workflow\')\n
\n
result = \'OK\'\n
error_list = []\n
\n
def assertEquals(a, b, msg=\'\'):\n
if a != b:\n
if msg:\n
error_list.append(msg)\n
else:\n
error_list.append(\'%r != %r\' % (a, b))\n
\n
foo_2 = foo_module[\'2\']\n
assertEquals(foo_2.getSimulationState(), \'draft\', \n
\'Foo 2 state is %s\' % foo_2.getSimulationState())\n
\n
\n
foo_3 = foo_module[\'3\']\n
assertEquals(foo_3.getSimulationState(), \'validated\', \n
\'Foo 3 state is %s\' % foo_3.getSimulationState())\n
if not error_list:\n
assertEquals(\n
wtool.getInfoFor(foo_3, \'history\', wf_id=\'foo_workflow\')[-2][\'comment\'],\n
\'Comment !\')\n
\n
if error_list:\n
result = \'\'.join(error_list)\n
\n
return \'<html><body><span id="result">%s</span></body></html>\' % result\n
]]></string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>Products.CMFCore.utils</string>
<string>getToolByName</string>
<string>_getattr_</string>
<string>context</string>
<string>foo_module</string>
<string>wtool</string>
<string>result</string>
<string>error_list</string>
<string>assertEquals</string>
<string>_getitem_</string>
<string>foo_2</string>
<string>foo_3</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Zuite_testFolderWorkflowActionFilteredSelectionCheckWorkflowHistory</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
from Products.CMFCore.utils import getToolByName\n
\n
foo_module = context.getPortalObject().foo_module\n
wtool = getToolByName(context, \'portal_workflow\')\n
\n
result = \'OK\'\n
error_list = []\n
\n
def assertEquals(a, b, msg=\'\'):\n
if a != b:\n
if msg:\n
error_list.append(msg)\n
else:\n
error_list.append(\'%r != %r\' % (a, b))\n
\n
\n
foo_1 = foo_module[\'1\']\n
assertEquals(foo_1.getSimulationState(), \'invalidated\', \n
\'Foo 1 state is %s\' % foo_1.getSimulationState())\n
if not error_list:\n
assertEquals(\n
wtool.getInfoFor(foo_1, \'history\', wf_id=\'foo_workflow\')[-2][\'comment\'],\n
\'Comment !\')\n
\n
\n
foo_2 = foo_module[\'2\']\n
assertEquals(foo_2.getSimulationState(), \'validated\', \n
\'Foo 2 state is %s\' % foo_2.getSimulationState())\n
if not error_list:\n
assertEquals(\n
wtool.getInfoFor(foo_2, \'history\', wf_id=\'foo_workflow\')[-2][\'comment\'],\n
\'Comment !\')\n
\n
foo_3 = foo_module[\'3\']\n
assertEquals(foo_3.getSimulationState(), \'validated\', \n
\'Foo 3 state is %s\' % foo_3.getSimulationState())\n
if not error_list:\n
assertEquals(\n
wtool.getInfoFor(foo_3, \'history\', wf_id=\'foo_workflow\')[-2][\'comment\'],\n
\'Comment !\')\n
\n
if error_list:\n
result = \'\'.join(error_list)\n
\n
return \'<html><body><span id="result">%s</span></body></html>\' % result\n
]]></string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>Products.CMFCore.utils</string>
<string>getToolByName</string>
<string>_getattr_</string>
<string>context</string>
<string>foo_module</string>
<string>wtool</string>
<string>result</string>
<string>error_list</string>
<string>assertEquals</string>
<string>_getitem_</string>
<string>foo_1</string>
<string>foo_2</string>
<string>foo_3</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Zuite_testFolderWorkflowActionMultipleActionsCheckWorkflowHistory</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
287
\ No newline at end of file
288
\ No newline at end of file
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