Commit a4541eb1 authored by Lucas Carvalho's avatar Lucas Carvalho

Added a test to show an error related with Portal Type Actions.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36457 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8e517f0a
......@@ -79,7 +79,7 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
quiet = 1
def getBusinessTemplateList(self):
return ('erp5_csv_style', 'erp5_pdf_style')
return ('erp5_csv_style', 'erp5_pdf_style', 'erp5_barcode')
def getTitle(self):
return "Business Template"
......@@ -6752,6 +6752,20 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
self.assertEquals(self.portal.exported_path,
self.portal.portal_catalog.getResultValue(uid=uid))
def test_bt5_must_be_exported(self):
""" Just to show an error. """
portal = self.getPortalObject()
template_tool = portal.portal_templates
bt5obj = portal.portal_catalog.getResultValue(portal_type='Business Template',
title='erp5_barcode')
template_copy = template_tool.manage_copyObjects(ids=(bt5obj.getId(),))
new_id_list = template_tool.manage_pasteObjects(template_copy)
new_bt5_id = new_id_list[0]['new_id']
new_bt5_obj = getattr(template_tool, new_bt5_id, None)
new_bt5_obj.edit()
new_bt5_obj.build()
template_tool.export(new_bt5_obj)
def test_suite():
suite = unittest.TestSuite()
......
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