Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testManageDelObjects
def testManageDelObjectsIfSub1Denied
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes

 sub1

Detailed Description

Definition at line 229 of file testPloneFolder.py.


Member Function Documentation

Definition at line 231 of file testPloneFolder.py.

00231 
00232     def afterSetUp(self):
00233         _createObjectByType('Folder', self.portal, id='sub1')
00234         self.sub1 = self.portal.sub1

Here is the call graph for this function:

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 235 of file testPloneFolder.py.

00235 
00236     def testManageDelObjects(self):
00237         # Should be able to delete sub1
00238         self.portal.manage_delObjects('sub1')
00239         self.failIf('sub1' in self.portal.objectIds())

Definition at line 240 of file testPloneFolder.py.

00240 
00241     def testManageDelObjectsIfSub1Denied(self):
00242         # Should be able to delete sub1 as the portal does not implement
00243         # additional permission checks.
00244         self.sub1.manage_permission(DeleteObjects, ['Manager'], acquire=0)
00245         self.assertRaises(Unauthorized, self.portal.manage_delObjects, 'sub1')
00246 


Member Data Documentation

Definition at line 233 of file testPloneFolder.py.


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