Back to index

plone3  3.1.7
Classes | Public Member Functions | Static Public Attributes | Private Member Functions
CMFPlacefulWorkflow.tests.CMFPlacefulWorkflowTestCase.CMFPlacefulWorkflowTestCase Class Reference
Collaboration diagram for CMFPlacefulWorkflow.tests.CMFPlacefulWorkflowTestCase.CMFPlacefulWorkflowTestCase:
Collaboration graph
[legend]

List of all members.

Classes

class  Session

Public Member Functions

def beforeTearDown
def loginAsPortalMember
def loginAsPortalOwner
def getPermissionsOfRole

Static Public Attributes

string portal_name = 'portal'
string portal_owner = 'portal_owner'
 user_name = PloneTestCase.default_user
 user_password = PloneTestCase.default_password

Private Member Functions

def _setup

Detailed Description

Definition at line 34 of file CMFPlacefulWorkflowTestCase.py.


Member Function Documentation

Definition at line 46 of file CMFPlacefulWorkflowTestCase.py.

00046 
00047     def _setup(self):
00048         PloneTestCase.PloneTestCase._setup(self)
00049         self.app.REQUEST['SESSION'] = self.Session()

Definition at line 50 of file CMFPlacefulWorkflowTestCase.py.

00050 
00051     def beforeTearDown(self):
00052         # logout
00053         noSecurityManager()
    

Definition at line 68 of file CMFPlacefulWorkflowTestCase.py.

00068 
00069     def getPermissionsOfRole(self, role):
00070         perms = self.portal.permissionsOfRole(role)
00071         return [p['name'] for p in perms if p['selected']]
00072 
00073 
00074 # Install CMFPlacefulWorkflow
00075 ZopeTestCase.installProduct('MimetypesRegistry')
00076 ZopeTestCase.installProduct('PythonScripts')
00077 ZopeTestCase.installProduct('PortalTransforms')
00078 ZopeTestCase.installProduct('Archetypes')
00079 ZopeTestCase.installProduct('ATContentTypes')
00080 ZopeTestCase.installProduct('PloneInstallation')
00081 ZopeTestCase.installProduct('CMFPlacefulWorkflow')
00082 
00083 # Setup Plone site
PloneTestCase.setupPloneSite(id='plone', products=[

Here is the caller graph for this function:

Use if you need to manipulate site as a member.

Definition at line 54 of file CMFPlacefulWorkflowTestCase.py.

00054 
00055     def loginAsPortalMember(self):
00056         '''Use if you need to manipulate site as a member.'''
00057         self._setupUser()
00058         self.mtool.createMemberarea(self.user_name)
00059         member = self.mtool.getMemberById(self.user_name)
00060         member.setMemberProperties({'fullname': self.user_name.capitalize(), 'email': 'test@example.com',})
00061         self.login()

Here is the call graph for this function:

Use if you need to manipulate site as a manager.

Definition at line 62 of file CMFPlacefulWorkflowTestCase.py.

00062 
00063     def loginAsPortalOwner(self):
00064         '''Use if you need to manipulate site as a manager.'''
00065         uf = self.app.acl_users
00066         user = uf.getUserById(self.portal_owner).__of__(uf)
00067         newSecurityManager(None, user)


Member Data Documentation

Definition at line 37 of file CMFPlacefulWorkflowTestCase.py.

Definition at line 38 of file CMFPlacefulWorkflowTestCase.py.

Definition at line 39 of file CMFPlacefulWorkflowTestCase.py.

Definition at line 40 of file CMFPlacefulWorkflowTestCase.py.


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