Commit b947037f authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

test: ignore business template dependencies in update, just like in install.

parent 8f165c65
...@@ -5029,7 +5029,7 @@ Business Template is a set of definitions, such as skins, portal types and categ ...@@ -5029,7 +5029,7 @@ Business Template is a set of definitions, such as skins, portal types and categ
return modified_object_list return modified_object_list
def _install(self, force=1, object_to_update=None, update_translation=0, def _install(self, force=1, object_to_update=None, update_translation=0,
update_catalog=False, **kw): update_catalog=False, check_dependencies=True, **kw):
""" """
Install a new Business Template, if force, all will be upgraded or installed Install a new Business Template, if force, all will be upgraded or installed
otherwise depends of dict object_to_update otherwise depends of dict object_to_update
...@@ -5052,7 +5052,7 @@ Business Template is a set of definitions, such as skins, portal types and categ ...@@ -5052,7 +5052,7 @@ Business Template is a set of definitions, such as skins, portal types and categ
if trash_tool is None: if trash_tool is None:
raise AttributeError, 'Trash Tool is not installed' raise AttributeError, 'Trash Tool is not installed'
if not force: if not force and check_dependencies:
self.checkDependencies() self.checkDependencies()
# always created a trash bin because we may to save object already present # always created a trash bin because we may to save object already present
......
...@@ -55,7 +55,7 @@ from Products.ERP5Type.Cache import CachingMethod\n ...@@ -55,7 +55,7 @@ from Products.ERP5Type.Cache import CachingMethod\n
Base_translateString = context.Base_translateString\n Base_translateString = context.Base_translateString\n
\n \n
def getModifiedObjectList(context):\n def getModifiedObjectList(context):\n
result = context.preinstall()\n result = context.preinstall(check_dependencies=check_dependencies)\n
return result\n return result\n
\n \n
def cacheIdGenerator(method_id, *args, **kw):\n def cacheIdGenerator(method_id, *args, **kw):\n
...@@ -126,7 +126,7 @@ return object_list\n ...@@ -126,7 +126,7 @@ return object_list\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>**kw</string> </value> <value> <string>check_dependencies=True, **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
...@@ -905,13 +905,15 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin): ...@@ -905,13 +905,15 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
install_kw = None install_kw = None
if get_install_kw: if get_install_kw:
install_kw = {} install_kw = {}
listbox_object_list = BusinessTemplate_getModifiedObject.__of__(bt)() listbox_object_list = BusinessTemplate_getModifiedObject.__of__(bt)(
check_dependencies=False)
for listbox_line in listbox_object_list: for listbox_line in listbox_object_list:
install_kw[listbox_line.object_id] = listbox_line.choice_item_list[0][1] install_kw[listbox_line.object_id] = listbox_line.choice_item_list[0][1]
bt.install(light_install=light_install, bt.install(light_install=light_install,
object_to_update=install_kw, object_to_update=install_kw,
update_catalog=bt.isCatalogUpdatable(), update_catalog=bt.isCatalogUpdatable(),
update_translation=1) update_translation=1,
check_dependencies=False)
# Release locks # Release locks
self.commit() self.commit()
if not quiet: if not quiet:
......
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