Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testDefaultGroups
def testDefaultConfiglets
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes

 controlpanel
 groups
 configlets

Detailed Description

Definition at line 10 of file testControlPanel.py.


Member Function Documentation

Definition at line 12 of file testControlPanel.py.

00012 
00013     def afterSetUp(self):
00014         self.controlpanel = getToolByName(self.portal, "portal_controlpanel")
00015         
00016         # get the expected default groups and configlets
00017         self.groups     = ['Plone', 'Products', 'Member']
00018         self.configlets = ['QuickInstaller', 'portal_atct', 'MailHost',
00019                            'UsersGroups', 'MemberPrefs', 'PortalSkin',
00020                            'MemberPassword', 'ZMI', 'SecuritySettings',
00021                            'NavigationSettings', 'SearchSettings',
00022                            'errorLog', 'kupu', 'PloneReconfig',
00023                            'CalendarSettings', 'TypesSettings', 
00024                            'PloneLanguageTool', 'CalendarSettings',
00025                            'HtmlFilter', 'Maintenance']

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 31 of file testControlPanel.py.

00031 
00032     def testDefaultConfiglets(self):
00033         for title in self.configlets:
00034             self.failUnless(title in [a.getAction(self)['id']
00035                                    for a in self.controlpanel.listActions()],
00036                             "Missing configlet with id '%s'" % title)
00037 

Definition at line 26 of file testControlPanel.py.

00026 
00027     def testDefaultGroups(self):
00028         for group in self.groups:
00029             self.failUnless(group in self.controlpanel.getGroupIds(),
00030                             "Missing group with id '%s'" % group)


Member Data Documentation

Definition at line 17 of file testControlPanel.py.

Definition at line 13 of file testControlPanel.py.

Definition at line 16 of file testControlPanel.py.


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