From 140027d28dcfabab2d193ecf802c698f96039e2a Mon Sep 17 00:00:00 2001 From: Nicolas Delaby <nicolas@nexedi.com> Date: Fri, 28 Jan 2011 14:27:32 +0000 Subject: [PATCH] Cleanup no needs to create OOoTemplate documents in these tests git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42744 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5OOo/tests/testFormPrintoutAsODG.py | 12 +----------- product/ERP5OOo/tests/testFormPrintoutAsODT.py | 13 +------------ 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/product/ERP5OOo/tests/testFormPrintoutAsODG.py b/product/ERP5OOo/tests/testFormPrintoutAsODG.py index 4a982f01dd..4c76c3e8af 100644 --- a/product/ERP5OOo/tests/testFormPrintoutAsODG.py +++ b/product/ERP5OOo/tests/testFormPrintoutAsODG.py @@ -67,17 +67,7 @@ class TestFormPrintoutAsODG(TestFormPrintoutMixin): precondition='', content_type='application/vnd.oasis.opendocument.graphics') erp5OOo = custom.manage_addProduct['ERP5OOo'] - addOOoTemplate = erp5OOo.addOOoTemplate - if custom._getOb('Foo_viewAsOdg', None) is None: - addOOoTemplate(id='Foo_viewAsOdg', title='') - request = self.app.REQUEST - Foo_viewAsOdg = custom.Foo_viewAsOdg - Foo_viewAsOdg.doSettings(request, title='', xml_file_id='content.xml', - ooo_stylesheet='Foo_getODGStyleSheet') - builder = OOoBuilder(foo_file) - content = builder.extract('content.xml') - Foo_viewAsOdg.pt_edit(content, - content_type='application/vnd.oasis.opendocument.graphics') + if custom._getOb('Foo_viewAsODGPrintout', None) is None: erp5OOo.addFormPrintout(id='Foo_viewAsODGPrintout', title='', form_name='Foo_view', template='Foo_getODGStyleSheet') diff --git a/product/ERP5OOo/tests/testFormPrintoutAsODT.py b/product/ERP5OOo/tests/testFormPrintoutAsODT.py index 6043a5c4c3..08662cae44 100644 --- a/product/ERP5OOo/tests/testFormPrintoutAsODT.py +++ b/product/ERP5OOo/tests/testFormPrintoutAsODT.py @@ -106,18 +106,7 @@ class TestFormPrintoutAsODT(TestFormPrintoutMixin): precondition='', content_type='application/vnd.oasis.opendocument.text') erp5OOo = custom.manage_addProduct['ERP5OOo'] - addOOoTemplate = erp5OOo.addOOoTemplate - if custom._getOb('Foo_viewAsOdt', None) is None: - addOOoTemplate(id='Foo_viewAsOdt', title='') - request = self.app.REQUEST - Foo_viewAsOdt = custom.Foo_viewAsOdt - Foo_viewAsOdt.doSettings(request, title='', xml_file_id='content.xml', - ooo_stylesheet='Foo_getODTStyleSheet') - #Foo_viewAsOdt.pt_upload(request, file=foo_file) - #render_result = Foo_viewAsOdt(REQUEST=request) - builder = OOoBuilder(foo_file) - content = builder.extract('content.xml') - Foo_viewAsOdt.pt_edit(content, content_type='application/vnd.oasis.opendocument.text') + if custom._getOb('Foo_viewAsPrintout', None) is None: erp5OOo.addFormPrintout(id='Foo_viewAsPrintout', title='', form_name='Foo_view', template='Foo_getODTStyleSheet') -- 2.30.9