Commit 7e7a7600 authored by Lucas Carvalho's avatar Lucas Carvalho

Renamed and added comments.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36459 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent afe1a8b7
...@@ -6752,17 +6752,19 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor): ...@@ -6752,17 +6752,19 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
self.assertEquals(self.portal.exported_path, self.assertEquals(self.portal.exported_path,
self.portal.portal_catalog.getResultValue(uid=uid)) self.portal.portal_catalog.getResultValue(uid=uid))
def test_bt5_must_be_exported(self): def test_export_bt5_with_portal_type_actions(self):
""" """
The bt5 must be exported correctly. Without fail exporting the Portal The bt5 must be exported correctly.
Type Actions as well. Without fail exporting the Portal Type Actions.
""" """
portal = self.getPortalObject() portal = self.getPortalObject()
template_tool = portal.portal_templates template_tool = portal.portal_templates
bt5obj = portal.portal_catalog.getResultValue(portal_type='Business Template', bt5obj = portal.portal_catalog.getResultValue(portal_type='Business Template',
title='erp5_barcode') title='erp5_barcode')
# it is required to copy and paste to be able to export it
template_copy = template_tool.manage_copyObjects(ids=(bt5obj.getId(),)) template_copy = template_tool.manage_copyObjects(ids=(bt5obj.getId(),))
new_id_list = template_tool.manage_pasteObjects(template_copy) new_id_list = template_tool.manage_pasteObjects(template_copy)
new_bt5_id = new_id_list[0]['new_id'] new_bt5_id = new_id_list[0]['new_id']
new_bt5_obj = getattr(template_tool, new_bt5_id, None) new_bt5_obj = getattr(template_tool, new_bt5_id, None)
new_bt5_obj.edit() new_bt5_obj.edit()
......
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