From 6f3c3119d31871e63996860f67dd2cd24b9a1ddf Mon Sep 17 00:00:00 2001 From: Julien Muchembled <jm@nexedi.com> Date: Thu, 12 Feb 2009 12:50:46 +0000 Subject: [PATCH] * 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 --- .../ERP5Type/tests/testDocumentationHelper.py | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/product/ERP5Type/tests/testDocumentationHelper.py b/product/ERP5Type/tests/testDocumentationHelper.py index bc9ef27c0e..c0005523b6 100644 --- a/product/ERP5Type/tests/testDocumentationHelper.py +++ b/product/ERP5Type/tests/testDocumentationHelper.py @@ -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() -- 2.30.9