Commit 0c9fc197 authored by Sebastien Robin's avatar Sebastien Robin

* several preferences where not well configured in testResource

* make Resource_init supporting several individual variations

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30943 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1db18f63
......@@ -57,12 +57,12 @@
\n
base = context.portal_preferences.getPreference(\'preferred_%s_variation_base_category_list\' % portal_type)\n
optional = context.portal_preferences.getPreference(\'preferred_%s_optional_variation_base_category_list\' % portal_type)\n
individual = context.portal_preferences.getPreference(\'preferred_%s_individual_variation_base_category\' % portal_type)\n
individual = context.portal_preferences.getPreference(\'preferred_%s_individual_variation_base_category_list\' % portal_type)\n
\n
if individual:\n
context.edit(variation_base_category_list=base,\n
optional_variation_base_category_list=optional,\n
individual_variation_base_category=individual)\n
individual_variation_base_category_list=individual)\n
else:\n
context.edit(variation_base_category_list=base,\n
optional_variation_base_category_list=optional)\n
......
392
\ No newline at end of file
393
......@@ -85,9 +85,10 @@ class TestResource(ERP5TypeTestCase):
if preference.getPreferenceState() == 'disabled':
preference.enable()
preference.setPreferredApparelModelVariationBaseCategoryList(('colour', 'size', 'morphology', 'industrial_phase',))
preference.setPreferredApparelModelVariationBaseCategoryList(('size', 'industrial_phase',))
preference.setPreferredApparelClothVariationBaseCategoryList(('size',))
preference.setPreferredApparelComponentVariationBaseCategoryList(('variation',))
preference.setPreferredApparelModelIndividualVariationBaseCategoryList(('morphology', 'colour',))
if preference.getPreferenceState() == 'disabled':
preference.enable()
transaction.commit()
......
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