Back to index

plone3  3.1.7
Private Member Functions
CMFCore.exportimport.tests.test_actions._ActionSetup Class Reference
Inheritance diagram for CMFCore.exportimport.tests.test_actions._ActionSetup:
Inheritance graph
[legend]
Collaboration diagram for CMFCore.exportimport.tests.test_actions._ActionSetup:
Collaboration graph
[legend]

List of all members.

Private Member Functions

def _initSite

Detailed Description

Definition at line 341 of file test_actions.py.


Member Function Documentation

def CMFCore.exportimport.tests.test_actions._ActionSetup._initSite (   self,
  foo = 2,
  bar = 2 
) [private]

Definition at line 343 of file test_actions.py.

00343 
00344     def _initSite(self, foo=2, bar=2):
00345         self.root.site = DummySite('site')
00346         site = self.root.site
00347         site.portal_membership = DummyMembershipTool()
00348 
00349         site.portal_actions = DummyActionsTool()
00350         site.portal_actions.addActionProvider('portal_actions')
00351 
00352         if foo > 0:
00353             site.portal_foo = DummyTool()
00354 
00355         if foo > 1:
00356             site.portal_foo.addAction(id='foo',
00357                                       name='Foo',
00358                                       action='foo',
00359                                       condition='python:1',
00360                                       permission=(),
00361                                       category='dummy',
00362                                       visible=1)
00363             site.portal_actions.addActionProvider('portal_foo')
00364 
00365         if bar > 0:
00366             site.portal_bar = DummyTool()
00367 
00368         if bar > 1:
00369             site.portal_bar.addAction(id='bar',
00370                                       name='Bar',
00371                                       action='bar',
00372                                       condition='python:0',
00373                                       permission=('Manage portal',),
00374                                       category='dummy',
00375                                       visible=0)
00376             site.portal_actions.addActionProvider('portal_bar')
00377 
00378         return site
00379 


The documentation for this class was generated from the following file: