Commit 488e5996 authored by Jérome Perrin's avatar Jérome Perrin

Reuse a preference with id erp5_ui_test_preference instead of creating a new one each time

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17760 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e2ff442c
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<string>Products.PythonScripts.PythonScript</string> <tuple/>
<string>PythonScript</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -74,7 +71,9 @@ if working_copy_list:\n ...@@ -74,7 +71,9 @@ if working_copy_list:\n
else:\n else:\n
list = (\'/var/lib/zope/unit_test/svn/bt5\', \'/var/lib/zope/unit_test/Products/ERP5/bootstrap\',)\n list = (\'/var/lib/zope/unit_test/svn/bt5\', \'/var/lib/zope/unit_test/Products/ERP5/bootstrap\',)\n
\n \n
pref = context.portal_preferences.newContent()\n pref = getattr(context.portal_preferences, "erp5_ui_test_preference", None)\n
if pref is None:\n
pref = context.portal_preferences.newContent(id="erp5_ui_test_preference")\n
pref.setPreferredSubversionWorkingCopyList(list)\n pref.setPreferredSubversionWorkingCopyList(list)\n
pref.enable()\n pref.enable()\n
\n \n
...@@ -131,7 +130,9 @@ return \'Set Preference Successfully.\'\n ...@@ -131,7 +130,9 @@ return \'Set Preference Successfully.\'\n
<string>tuple</string> <string>tuple</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>list</string> <string>list</string>
<string>getattr</string>
<string>context</string> <string>context</string>
<string>None</string>
<string>pref</string> <string>pref</string>
</tuple> </tuple>
</value> </value>
......
...@@ -120,7 +120,9 @@ resetSelection(\'foo_line_selection\')\n ...@@ -120,7 +120,9 @@ resetSelection(\'foo_line_selection\')\n
resetSelection(\'bar_selection\')\n resetSelection(\'bar_selection\')\n
\n \n
\n \n
pref = context.portal_preferences.newContent()\n pref = getattr(context.portal_preferences, "erp5_ui_test_preference", None)\n
if pref is None:\n
pref = context.portal_preferences.newContent(id="erp5_ui_test_preference")\n
pref.setPreferredListboxListModeLineCount(10)\n pref.setPreferredListboxListModeLineCount(10)\n
pref.enable()\n pref.enable()\n
\n \n
...@@ -184,6 +186,7 @@ return \'Reset Successfully.\'\n ...@@ -184,6 +186,7 @@ return \'Reset Successfully.\'\n
<string>result</string> <string>result</string>
<string>default_columns</string> <string>default_columns</string>
<string>resetSelection</string> <string>resetSelection</string>
<string>None</string>
<string>pref</string> <string>pref</string>
</tuple> </tuple>
</value> </value>
......
275 276
\ 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