Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testPrefsUserDetails
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes

 portal_path
 basic_auth

Detailed Description

Yipee, functional tests

Definition at line 154 of file testControlPanelScripts.py.


Member Function Documentation

Definition at line 157 of file testControlPanelScripts.py.

00157 
00158     def afterSetUp(self):
00159         self.portal_path = self.portal.absolute_url(1)
00160         self.basic_auth = '%s:%s' % (default_user, default_password)

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:

Test access to user details.

Definition at line 161 of file testControlPanelScripts.py.

00161 
00162     def testPrefsUserDetails(self):
00163         '''Test access to user details.'''
00164         self.setRoles(['Manager'])
00165         
00166         response = self.publish('%s/portal_memberdata/prefs_user_details?userid=%s' %
00167                                 (self.portal_path, default_user),
00168                                 self.basic_auth)
00169 
00170         # this was failing in early Plone 2.5 due to missing five:traversable
00171         # declaration for tools
00172         self.assertEquals(response.getStatus(), 200)
00173 

Here is the call graph for this function:


Member Data Documentation

Definition at line 159 of file testControlPanelScripts.py.

Definition at line 158 of file testControlPanelScripts.py.


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