Commit 50b7b1f1 authored by Tatuya Kamada's avatar Tatuya Kamada

The test did not work correctly.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26253 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f09d9819
...@@ -57,10 +57,12 @@ class TestFormPrintout(ERP5TypeTestCase): ...@@ -57,10 +57,12 @@ class TestFormPrintout(ERP5TypeTestCase):
foo_file = open(foo_file_path, 'rb') foo_file = open(foo_file_path, 'rb')
custom = self.portal.portal_skins.custom custom = self.portal.portal_skins.custom
addStyleSheet = custom.manage_addProduct['OFSP'].manage_addFile addStyleSheet = custom.manage_addProduct['OFSP'].manage_addFile
if custom._getOb('Foo_getODTStyleSheet', None) is None:
addStyleSheet(id='Foo_getODTStyleSheet', file=foo_file, title='', addStyleSheet(id='Foo_getODTStyleSheet', file=foo_file, title='',
precondition='', content_type = 'application/vnd.oasis.opendocument.text') precondition='', content_type = 'application/vnd.oasis.opendocument.text')
erp5OOo = custom.manage_addProduct['ERP5OOo'] erp5OOo = custom.manage_addProduct['ERP5OOo']
addOOoTemplate = erp5OOo.addOOoTemplate addOOoTemplate = erp5OOo.addOOoTemplate
if custom._getOb('Foo_viewAsOdt', None) is None:
addOOoTemplate(id='Foo_viewAsOdt', title='') addOOoTemplate(id='Foo_viewAsOdt', title='')
request = self.app.REQUEST request = self.app.REQUEST
Foo_viewAsOdt = custom.Foo_viewAsOdt Foo_viewAsOdt = custom.Foo_viewAsOdt
...@@ -72,7 +74,7 @@ class TestFormPrintout(ERP5TypeTestCase): ...@@ -72,7 +74,7 @@ class TestFormPrintout(ERP5TypeTestCase):
builder = OOoBuilder(foo_file) builder = OOoBuilder(foo_file)
content = builder.extract('content.xml') content = builder.extract('content.xml')
Foo_viewAsOdt.pt_edit(content, content_type='application/vnd.oasis.opendocument.text') 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='', erp5OOo.addFormPrintout(id='Foo_viewAsPrintout', title='',
form_name='Foo_view', template='Foo_getODTStyleSheet') form_name='Foo_view', template='Foo_getODTStyleSheet')
...@@ -82,7 +84,7 @@ class TestFormPrintout(ERP5TypeTestCase): ...@@ -82,7 +84,7 @@ class TestFormPrintout(ERP5TypeTestCase):
user = uf.getUserById('tatuya').__of__(uf) user = uf.getUserById('tatuya').__of__(uf)
newSecurityManager(None, user) newSecurityManager(None, user)
def _test_01_Paragraph(self, quiet=0, run=run_all_test): def test_01_Paragraph(self, quiet=0, run=run_all_test):
""" """
mapping a field to a paragraph mapping a field to a paragraph
""" """
...@@ -371,3 +373,8 @@ class TestFormPrintout(ERP5TypeTestCase): ...@@ -371,3 +373,8 @@ class TestFormPrintout(ERP5TypeTestCase):
meta.xml not supported yet meta.xml not supported yet
""" """
pass pass
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestFormPrintout))
return suite
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