Commit 06a9a190 authored by Jean-Paul Smets's avatar Jean-Paul Smets

*** empty log message ***


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@428 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent aa8334ad
...@@ -9,7 +9,6 @@ __version__ = '0.3.0' ...@@ -9,7 +9,6 @@ __version__ = '0.3.0'
from Testing import ZopeTestCase from Testing import ZopeTestCase
from Testing.ZopeTestCase.PortalTestCase import PortalTestCase from Testing.ZopeTestCase.PortalTestCase import PortalTestCase
# Std Zope Products # Std Zope Products
ZopeTestCase.installProduct('ExtFile') ZopeTestCase.installProduct('ExtFile')
ZopeTestCase.installProduct('Photo') ZopeTestCase.installProduct('Photo')
...@@ -102,6 +101,16 @@ class ERP5TypeTestCase(PortalTestCase): ...@@ -102,6 +101,16 @@ class ERP5TypeTestCase(PortalTestCase):
""" """
return () return ()
# Utility methods specific to ERP5Type
def getTemplateTool(self):
return getattr(self.getPortal(), 'portal_templates', None)
def getCategoryTool(self):
return getattr(self.getPortal(), 'portal_categories', None)
def getTypeTool(self):
return getattr(self.getPortal(), 'portal_types', None)
def setupERP5Site(business_template_list=(), app=None, portal_name=portal_name, quiet=0): def setupERP5Site(business_template_list=(), app=None, portal_name=portal_name, quiet=0):
''' '''
...@@ -126,7 +135,6 @@ def setupERP5Site(business_template_list=(), app=None, portal_name=portal_name, ...@@ -126,7 +135,6 @@ def setupERP5Site(business_template_list=(), app=None, portal_name=portal_name,
factory.manage_addERP5Site(portal_name) factory.manage_addERP5Site(portal_name)
portal=app[portal_name] portal=app[portal_name]
# VERY IMPORTANT: Add some business templates # VERY IMPORTANT: Add some business templates
#business_template_list = ('erp5_common', 'erp5_accounting', )
for id in business_template_list: for id in business_template_list:
ZopeTestCase._print('Adding %s business template ... \n' % id) ZopeTestCase._print('Adding %s business template ... \n' % id)
portal.portal_templates.download('%s.zexp' % id, id=id) portal.portal_templates.download('%s.zexp' % id, id=id)
......
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