Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
CMFPlone.tests.testGroupDataTool.TestMethodProtection Class Reference
Inheritance diagram for CMFPlone.tests.testGroupDataTool.TestMethodProtection:
Inheritance graph
[legend]
Collaboration diagram for CMFPlone.tests.testGroupDataTool.TestMethodProtection:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def testAnonAddMember
def testAnonRemoveMember
def testMemberAddMember
def testMemberRemoveMember
def testManagerAddMember
def testManagerRemoveMember
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes

 groups
 groupdata

Detailed Description

Definition at line 161 of file testGroupDataTool.py.


Member Function Documentation

Definition at line 164 of file testGroupDataTool.py.

00164 
00165     def afterSetUp(self):
00166         self.groups = self.portal.portal_groups
00167         self.groups.groupWorkspacesCreationFlag = 0
00168         self.groups.addGroup('foo')
00169         self.groupdata = self.groups.getGroupById('foo')

Definition at line 30 of file PloneTestCase.py.

00030 
00031     def getAuthenticator(self):
00032         tag = AuthenticatorView('context', 'request').authenticator()
00033         pattern = '<input .*name="(\w+)".*value="(\w+)"'
00034         return match(pattern, tag).groups()

Here is the call graph for this function:

Here is the caller graph for this function:

def CMFPlone.tests.PloneTestCase.PloneTestCase.setRequestMethod (   self,
  method 
) [inherited]
This is a stub now, but in case you want to try
   something fancy on Your Branch (tm), put it here.

Definition at line 26 of file PloneTestCase.py.

00026 
00027     def setRequestMethod(self, method):
00028         self.app.REQUEST.set('REQUEST_METHOD', method)
00029         self.app.REQUEST.method = method

Here is the caller graph for this function:

Definition at line 35 of file PloneTestCase.py.

00035 
00036     def setupAuthenticator(self):
00037         name, token = self.getAuthenticator()
00038         self.app.REQUEST.form[name] = token
00039 

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 170 of file testGroupDataTool.py.

00170 
00171     def testAnonAddMember(self):
00172         self.logout()
00173         self.assertRaises(Unauthorized, self.groupdata.addMember, default_user)

Here is the call graph for this function:

Definition at line 174 of file testGroupDataTool.py.

00174 
00175     def testAnonRemoveMember(self):
00176         self.logout()
00177         self.assertRaises(Unauthorized, self.groupdata.removeMember, default_user)

Here is the call graph for this function:

Definition at line 184 of file testGroupDataTool.py.

00184 
00185     def testManagerAddMember(self):
00186         self.setPermissions([Permissions.manage_users])
00187         self.groupdata.addMember(default_user)

Here is the call graph for this function:

Definition at line 188 of file testGroupDataTool.py.

00188 
00189     def testManagerRemoveMember(self):
00190         self.setPermissions([Permissions.manage_users])
00191         self.groupdata.addMember(default_user)
00192         self.groupdata.removeMember(default_user)
00193 

Here is the call graph for this function:

Definition at line 178 of file testGroupDataTool.py.

00178 
00179     def testMemberAddMember(self):
00180         self.assertRaises(Unauthorized, self.groupdata.addMember, default_user)

Definition at line 181 of file testGroupDataTool.py.

00181 
00182     def testMemberRemoveMember(self):
00183         self.assertRaises(Unauthorized, self.groupdata.removeMember, default_user)


Member Data Documentation

Definition at line 168 of file testGroupDataTool.py.

Definition at line 165 of file testGroupDataTool.py.


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