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,11 +57,13 @@ class TestFormPrintout(ERP5TypeTestCase): ...@@ -57,11 +57,13 @@ 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
addStyleSheet(id='Foo_getODTStyleSheet', file=foo_file, title='', if custom._getOb('Foo_getODTStyleSheet', None) is None:
precondition='', content_type = 'application/vnd.oasis.opendocument.text') addStyleSheet(id='Foo_getODTStyleSheet', file=foo_file, title='',
precondition='', content_type = 'application/vnd.oasis.opendocument.text')
erp5OOo = custom.manage_addProduct['ERP5OOo'] erp5OOo = custom.manage_addProduct['ERP5OOo']
addOOoTemplate = erp5OOo.addOOoTemplate addOOoTemplate = erp5OOo.addOOoTemplate
addOOoTemplate(id='Foo_viewAsOdt', title='') if custom._getOb('Foo_viewAsOdt', None) is None:
addOOoTemplate(id='Foo_viewAsOdt', title='')
request = self.app.REQUEST request = self.app.REQUEST
Foo_viewAsOdt = custom.Foo_viewAsOdt Foo_viewAsOdt = custom.Foo_viewAsOdt
Foo_viewAsOdt.doSettings(request, title='', xml_file_id='content.xml', Foo_viewAsOdt.doSettings(request, title='', xml_file_id='content.xml',
...@@ -72,9 +74,9 @@ class TestFormPrintout(ERP5TypeTestCase): ...@@ -72,9 +74,9 @@ 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')
def login(self): def login(self):
uf = self.getPortal().acl_users uf = self.getPortal().acl_users
...@@ -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