Commit 140027d2 authored by Nicolas Delaby's avatar Nicolas Delaby

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
parent aa89e987
......@@ -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')
......
......@@ -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')
......
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