Commit c74065e7 authored by Jérome Perrin's avatar Jérome Perrin

minimalistic test for ods export with a domain tree mode listbox



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19079 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f1599ef5
...@@ -54,6 +54,9 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -54,6 +54,9 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
self.tic() self.tic()
self.portal.changeSkin(self.skin) self.portal.changeSkin(self.skin)
self.validator = Validator() self.validator = Validator()
# make sure selections are empty
self.portal.portal_selections.setSelectionFor(
'person_module_selection', None)
def _validate(self, odf_file_data): def _validate(self, odf_file_data):
error_list = self.validator.validate(odf_file_data) error_list = self.validator.validate(odf_file_data)
...@@ -64,7 +67,21 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -64,7 +67,21 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
self.assertTrue(self.skin in self.assertTrue(self.skin in
self.portal.portal_skins.getSkinSelections()) self.portal.portal_skins.getSkinSelections())
def test_list_view(self): def test_form_list(self):
response = self.publish(
'/%s/person_module/PersonModule_viewPersonList'
% self.portal.getId(), self.auth)
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_form_list_report_tree(self):
self.portal.portal_selections.setListboxDisplayMode(
self.portal.REQUEST, 'DomainTreeMode',
'person_module_selection')
response = self.publish( response = self.publish(
'/%s/person_module/PersonModule_viewPersonList' '/%s/person_module/PersonModule_viewPersonList'
% self.portal.getId(), self.auth) % self.portal.getId(), self.auth)
......
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