Commit 6f3c3119 authored by Julien Muchembled's avatar Julien Muchembled

* Test creation of ODT report.

* Use the right helper class in test_02_BusinessTemplate.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25542 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e5610dec
......@@ -45,9 +45,8 @@ class TestDocumentationHelper(ERP5TypeTestCase):
This is the list of test
"""
auth = "ERP5TypeTestCase:"
run_all_test = 1
def getTitle(self):
return "DocumentationHelper"
......@@ -56,7 +55,7 @@ class TestDocumentationHelper(ERP5TypeTestCase):
def getBusinessTemplateList(self):
"""return list of business templates to be installed. """
return 'erp5_documentation', 'erp5_ui_test'
return 'erp5_documentation', 'erp5_ui_test', 'erp5_odt_style'
def test_01_ERP5Site(self):
ZopeTestCase._print('\nTest Documentation ERP5Site')
......@@ -67,10 +66,14 @@ class TestDocumentationHelper(ERP5TypeTestCase):
self.assertTrue('erp5_core' in bt_title_set)
self.assertTrue('erp5_documentation' in bt_title_set)
self.portal.portal_classes.getDocumentationHelper(
'ERP5SiteDocumentationHelper', site_uri).view()
site_do.getClassName(), site_uri).view()
#test the report mode of the documentation of the whole site
self.portal.REQUEST['class_name'] = 'ERP5SiteDocumentationHelper'
self.portal.REQUEST['class_name'] = site_do.getClassName()
self.portal.REQUEST['uri'] = site_uri
self.portal.REQUEST['business_template_list'] = 'erp5_documentation',
self.portal.portal_classes.DocumentationHelper_viewReport()
self.portal.REQUEST['business_template_list'] = 'erp5_ui_test',
self.portal.REQUEST['portal_skin'] = 'ODT'
self.portal.portal_classes.DocumentationHelper_viewReport()
def test_02_BusinessTemplate(self):
......@@ -85,8 +88,8 @@ class TestDocumentationHelper(ERP5TypeTestCase):
self.assertTrue('foo_module' in bt_do.getModuleIdList())
self.assertTrue('bar_module' in bt_do.getModuleIdList())
self.portal.portal_classes.getDocumentationHelper(
'BusinessTemplateDocumentationHelper', bt_uri).view()
self.portal.REQUEST['class_name'] = 'ERP5SiteDocumentationHelper'
bt_do.getClassName(), bt_uri).view()
self.portal.REQUEST['class_name'] = bt_do.getClassName()
self.portal.REQUEST['uri'] = bt_uri
self.portal.portal_classes.DocumentationHelper_viewReport()
......@@ -115,8 +118,8 @@ class TestDocumentationHelper(ERP5TypeTestCase):
self.assertTrue('restrictedTraverse' in instance_foo.getClassMethodIdList())
self.assertTrue('_baseGetDescription' in instance_foo.getAccessorMethodIdList())
self.portal.portal_classes.getDocumentationHelper(
'PortalTypeInstanceDocumentationHelper', instance_uri).view()
self.portal.REQUEST['class_name'] = 'PortalTypeInstanceDocumentationHelper'
instance_foo.getClassName(), instance_uri).view()
self.portal.REQUEST['class_name'] = instance_foo.getClassName()
self.portal.REQUEST['uri'] = instance_uri
self.portal.portal_classes.DocumentationHelper_viewReport()
......
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