Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testAcquisitionAllowed
def testAcquisitionDenied
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes

 folder

Private Member Functions

def _makePS

Detailed Description

Definition at line 36 of file testRestrictedAcquisition.py.


Member Function Documentation

def CMFPlone.tests.testRestrictedAcquisition.BrokenAcquisitionTest._makePS (   self,
  context,
  id,
  params,
  body 
) [private]

Definition at line 43 of file testRestrictedAcquisition.py.

00043 
00044     def _makePS(self, context, id, params, body):
00045         factory = context.manage_addProduct['PythonScripts']
00046         factory.manage_addPythonScript(id)
00047         ps = context[id]
00048         ps.ZPythonScript_edit(params, body)

Here is the caller graph for this function:

Definition at line 38 of file testRestrictedAcquisition.py.

00038 
00039     def afterSetUp(self):
00040         self.folder = self.portal
00041         self.folder._setObject('allowed', AllowedItem())
00042         self.folder._setObject('denied', DeniedItem())

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 49 of file testRestrictedAcquisition.py.

00049 
00050     def testAcquisitionAllowed(self):
00051         self._makePS(self.folder, 'ps', '', 'print context.portal_membership')
00052         self.folder.allowed.ps()

Here is the call graph for this function:

Definition at line 53 of file testRestrictedAcquisition.py.

00053 
00054     def testAcquisitionDenied(self):
00055         # This test fails in Zope 2.7.3
00056         # Also see http://zope.org/Collectors/CMF/259
00057         self._makePS(self.folder, 'ps', '', 'print context.portal_membership')
00058         self.folder.denied.ps()
00059 

Here is the call graph for this function:


Member Data Documentation

Definition at line 39 of file testRestrictedAcquisition.py.


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