[Erp5-report] r36564 lucas - /erp5/trunk/products/ERP5/tests/testBusinessTemplate.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Jun 24 01:13:36 CEST 2010
Author: lucas
Date: Thu Jun 24 01:13:34 2010
New Revision: 36564
URL: http://svn.erp5.org?rev=36564&view=rev
Log:
The erp5_barcode is not required anymore, once it also fails using the erp5_core. Using proper API instead of portal_catalog.
Modified:
erp5/trunk/products/ERP5/tests/testBusinessTemplate.py
Modified: erp5/trunk/products/ERP5/tests/testBusinessTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testBusinessTemplate.py?rev=36564&r1=36563&r2=36564&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testBusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testBusinessTemplate.py [utf8] Thu Jun 24 01:13:34 2010
@@ -82,7 +82,6 @@ class TestBusinessTemplate(ERP5TypeTestC
return ('erp5_base',
'erp5_csv_style',
'erp5_pdf_style',
- 'erp5_barcode',
)
def getTitle(self):
@@ -6771,8 +6770,7 @@ class TestBusinessTemplate(ERP5TypeTestC
portal = self.getPortalObject()
template_tool = portal.portal_templates
# Try with erp5_base, which contais ActionTemplateItem and works.
- bt5obj = portal.portal_catalog.getResultValue(portal_type='Business Template',
- title='erp5_base')
+ bt5obj = template_tool.getInstalledBusinessTemplate('erp5_base')
template_copy = template_tool.manage_copyObjects(ids=(bt5obj.getId(),))
new_id_list = template_tool.manage_pasteObjects(template_copy)
@@ -6785,8 +6783,7 @@ class TestBusinessTemplate(ERP5TypeTestC
# Use erp5_barcode because it contains ActionTemplateItem, which seems to
# cause problems to be export. Maybe create a test bt5 with all items could
# be more appropriated.
- bt5obj = portal.portal_catalog.getResultValue(portal_type='Business Template',
- title='erp5_barcode')
+ bt5obj = template_tool.getInstalledBusinessTemplate('erp5_core')
# it is required to copy and paste to be able to export it
template_copy = template_tool.manage_copyObjects(ids=(bt5obj.getId(),))
new_id_list = template_tool.manage_pasteObjects(template_copy)
More information about the Erp5-report
mailing list