Commit 5c4572bf authored by Jérome Perrin's avatar Jérome Perrin

add minimal tests to render an OOoChart in ODS and ODT style

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24923 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 26fd2f9d
No related merge requests found
......@@ -47,13 +47,12 @@ class TestOOoChart(ERP5TypeTestCase, ZopeTestCase.Functional):
ooo_chart_id = 'my_ooochart'
nb_persons = 10
content_type = 'application/vnd.oasis.opendocument.graphics'
skin = 'ODG'
def getTitle(self):
return 'Test OOoChart'
def getBusinessTemplateList(self):
return ('erp5_base', 'erp5_ui_test',)
return ('erp5_base', 'erp5_ui_test', 'erp5_odt_style', 'erp5_ods_style',)
def afterSetUp(self):
self.auth = 'ERP5TypeTestCase:'
......@@ -311,6 +310,28 @@ class TestOOoChart(ERP5TypeTestCase, ZopeTestCase.Functional):
# Test Validation Relax NG
self._validate(body)
def test_ods_style(self):
# simple rendering of a chart in ods style
self.portal.changeSkin('ODS')
response = self.publish(
'/%s/%s' % (self.portal.getId(), self.form_id),
self.auth,
handle_errors=False )
self.assertEquals(HTTP_OK, response.getStatus())
body = response.getBody()
self._validate(body)
def test_odt_style(self):
# simple rendering of a chart in odt style
self.portal.changeSkin('ODT')
response = self.publish(
'/%s/%s' % (self.portal.getId(), self.form_id),
self.auth,
handle_errors=False )
self.assertEquals(HTTP_OK, response.getStatus())
body = response.getBody()
self._validate(body)
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