Commit 9069e099 authored by Jérome Perrin's avatar Jérome Perrin

test a report view with report sections using form list


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35056 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c0bcfeaa
......@@ -187,7 +187,9 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
self.assertEquals('inline', content_disposition.split(';')[0])
self._validate(response.getBody())
def test_report_view(self):
def test_report_view_form_view(self):
# Test report view rendering forms using form_view
self.assertEquals('form_view', self.portal.Base_viewWorkflowHistory.pt)
response = self.publish(
'/%s/person_module/pers/Base_viewHistory'
% self.portal.getId(), self.auth)
......@@ -198,6 +200,26 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
self.assertEquals('inline', content_disposition.split(';')[0])
self._validate(response.getBody())
def test_report_view_form_list(self):
# Test report view rendering forms using form_list
self.portal.Base_viewWorkflowHistory.pt = 'form_list'
try:
# publish commits a transaction, so we have to restore the original page
# template on the form
response = self.publish(
'/%s/person_module/pers/Base_viewHistory'
% self.portal.getId(), self.auth)
finally:
self.portal.Base_viewWorkflowHistory.pt = 'form_view'
transaction.commit()
self.assertEquals(HTTP_OK, response.getStatus())
content_type = response.getHeader('content-type')
self.assertTrue(content_type.startswith(self.content_type), content_type)
content_disposition = response.getHeader('content-disposition')
self.assertEquals('inline', content_disposition.split(';')[0])
self._validate(response.getBody())
def test_report_view_landscape(self):
response = self.publish(
'/%s/person_module/pers/Base_viewHistory?landscape=1'
......
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