Commit 181c9d3a authored by Ivan Tyagov's avatar Ivan Tyagov

Mark test as destructive (will delete all user's pads).

Fix tests accordingly.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40577 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9429fc73
...@@ -48,11 +48,15 @@ ...@@ -48,11 +48,15 @@
<tr><td rowspan="1" colspan="3" tal:content="template/getId"></td></tr>\n <tr><td rowspan="1" colspan="3" tal:content="template/getId"></td></tr>\n
</thead><tbody>\n </thead><tbody>\n
\n \n
<!--\n
This is a desctructive test which will delete all pads for current user.\n
-->\n
\n
<span metal:use-macro="container/Zuite_CommonTemplate/macros/init"> init</span>\n <span metal:use-macro="container/Zuite_CommonTemplate/macros/init"> init</span>\n
\n \n
<tr>\n <tr>\n
<td>openAndWait</td>\n <td>openAndWait</td>\n
<td>${base_url}/Zuite_setupGadgets</td>\n <td>${base_url}/Zuite_setupGadgets?remove_existing_pads=1&amp;mode=erp5_front</td>\n
<td></td>\n <td></td>\n
</tr>\n </tr>\n
<tr>\n <tr>\n
......
...@@ -60,13 +60,14 @@ for gadget in context.portal_gadgets.objectValues():\n ...@@ -60,13 +60,14 @@ for gadget in context.portal_gadgets.objectValues():\n
active_preference = context.portal_preferences.getActivePreference()\n active_preference = context.portal_preferences.getActivePreference()\n
knowledge_pad = active_preference.newContent(portal_type="Knowledge Pad",\n knowledge_pad = active_preference.newContent(portal_type="Knowledge Pad",\n
title="Template Pad")\n title="Template Pad")\n
\n
knowledge_pad.visible()\n knowledge_pad.visible()\n
knowledge_pad.public()\n knowledge_pad.public()\n
\n \n
# XXX: add some gadgets\n
\n
\n \n
if remove_existing_pads:\n
# delete existing pads\n
user_knowledge_pad_list = context.ERP5Site_getKnowledgePadListForUser(mode = mode)\n
context.knowledge_pad_module.manage_delObjects([x.getId() for x in user_knowledge_pad_list])\n
\n \n
print "Done"\n print "Done"\n
return printed\n return printed\n
...@@ -78,6 +79,10 @@ return printed\n ...@@ -78,6 +79,10 @@ return printed\n
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>_params</string> </key>
<value> <string>remove_existing_pads=0, mode=\'erp5_front\'</string> </value>
</item>
<item> <item>
<key> <string>_proxy_roles</string> </key> <key> <string>_proxy_roles</string> </key>
<value> <value>
...@@ -104,12 +109,14 @@ return printed\n ...@@ -104,12 +109,14 @@ return printed\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>0</int> </value> <value> <int>2</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>remove_existing_pads</string>
<string>mode</string>
<string>_print_</string> <string>_print_</string>
<string>_print</string> <string>_print</string>
<string>_getiter_</string> <string>_getiter_</string>
...@@ -118,6 +125,10 @@ return printed\n ...@@ -118,6 +125,10 @@ return printed\n
<string>gadget</string> <string>gadget</string>
<string>active_preference</string> <string>active_preference</string>
<string>knowledge_pad</string> <string>knowledge_pad</string>
<string>user_knowledge_pad_list</string>
<string>append</string>
<string>$append0</string>
<string>x</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -129,7 +140,10 @@ return printed\n ...@@ -129,7 +140,10 @@ return printed\n
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<none/> <tuple>
<int>0</int>
<string>erp5_front</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
16 17
\ No newline at end of file \ 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