Back to index

plone3  3.1.7
Classes | Functions | Variables
CMFTestCase.setup Namespace Reference

Classes

class  SiteSetup
class  SiteCleanup

Functions

def setupCMFSite
def cleanupCMFSite
def _placefulSetUp
def _placefulTearDown
def _optimize

Variables

int CMF15 = 0
int CMF16 = 0
int CMF20 = 0
int CMF21 = 0
int USELAYER = 0
int Z3INTERFACES = 0
string portal_name = 'cmf'
string portal_owner = 'portal_owner'
tuple default_products = ()
 default_user = ZopeTestCase.user_name
 default_password = ZopeTestCase.user_password
string default_base_profile = 'CMFDefault:default'
tuple default_extension_profiles = ()
tuple setupCMFSite = layer.onsetup(setupCMFSite)
tuple cleanupCMFSite = layer.onteardown(cleanupCMFSite)
 text

Function Documentation

def CMFTestCase.setup._optimize ( ) [private]
Reduces portal creation time.

Definition at line 314 of file setup.py.

00314 
00315 def _optimize():
00316     '''Reduces portal creation time.'''
00317     # Don't compile expressions on creation
00318     def __init__(self, text):
00319         self.text = text
00320     from Products.CMFCore.Expression import Expression
00321     Expression.__init__ = __init__
00322     # Don't clone actions but convert to list only
00323     def _cloneActions(self):
00324         return list(self._actions)
00325     from Products.CMFCore.ActionProviderBase import ActionProviderBase
00326     ActionProviderBase._cloneActions = _cloneActions
00327     # The site creation code is not needed anymore in CMF >= 1.6
00328     # as it is now based on GenericSetup
00329     if not CMF16:
00330         # Don't setup 'index_html' in Members folder
00331         def setupMembersFolder(self, p):
00332             p.manage_addPortalFolder('Members')
00333         from Products.CMFDefault.Portal import PortalGenerator
00334         PortalGenerator.setupMembersFolder = setupMembersFolder
00335 

Here is the call graph for this function:

def CMFTestCase.setup._placefulSetUp (   portal) [private]
Sets the local site/manager.

Definition at line 296 of file setup.py.

00296 
00297 def _placefulSetUp(portal):
00298     '''Sets the local site/manager.'''
00299     from zope.app.component.hooks import setHooks, setSite
00300     from zope.component.interfaces import ComponentLookupError
00301     setHooks()
00302     try:
00303         setSite(portal)
00304     except ComponentLookupError:
00305         pass
00306 

Here is the caller graph for this function:

Resets the local site/manager.

Definition at line 307 of file setup.py.

00307 
00308 def _placefulTearDown():
00309     '''Resets the local site/manager.'''
00310     from zope.app.component.hooks import resetHooks, setSite
00311     resetHooks()
00312     setSite()
00313 

Here is the caller graph for this function:

Removes a site.

Definition at line 113 of file setup.py.

00113 
00114 def cleanupCMFSite(id):
00115     '''Removes a site.'''
00116     SiteCleanup(id).run()

Here is the call graph for this function:

def CMFTestCase.setup.setupCMFSite (   id = portal_name,
  products = default_products,
  quiet = 0,
  base_profile = default_base_profile,
  extension_profiles = default_extension_profiles 
)
Creates a CMF site and/or installs products into it.

Definition at line 101 of file setup.py.

00101 
00102                  extension_profiles=default_extension_profiles):
00103     '''Creates a CMF site and/or installs products into it.'''
00104     if USELAYER:
00105         quiet = 1
00106         cleanupCMFSite(id)
00107     SiteSetup(id, products, quiet, base_profile, extension_profiles).run()

Here is the call graph for this function:


Variable Documentation

Definition at line 119 of file setup.py.

Definition at line 22 of file setup.py.

Definition at line 30 of file setup.py.

Definition at line 39 of file setup.py.

Definition at line 49 of file setup.py.

string CMFTestCase.setup.default_base_profile = 'CMFDefault:default'

Definition at line 90 of file setup.py.

Definition at line 91 of file setup.py.

CMFTestCase.setup.default_password = ZopeTestCase.user_password

Definition at line 88 of file setup.py.

Definition at line 86 of file setup.py.

CMFTestCase.setup.default_user = ZopeTestCase.user_name

Definition at line 87 of file setup.py.

Definition at line 84 of file setup.py.

Definition at line 85 of file setup.py.

Definition at line 110 of file setup.py.

Definition at line 318 of file setup.py.

Definition at line 60 of file setup.py.

Definition at line 68 of file setup.py.