Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
CMFPlone.tests.testCheckId.TestVisibleIdsEnabled Class Reference
Inheritance diagram for CMFPlone.tests.testCheckId.TestVisibleIdsEnabled:
Inheritance graph
Collaboration diagram for CMFPlone.tests.testCheckId.TestVisibleIdsEnabled:
Collaboration graph

List of all members.

Public Member Functions

def afterSetUp
def testFailsWithSitePropertyDisabled
def testFailsWithMemberPropertyDisabled
def testSucceedsWithMemberAndSitePropertyEnabled
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes


Detailed Description

Tests the visibleIdsEnabled script

Definition at line 249 of file

Member Function Documentation

Definition at line 252 of file

00253     def afterSetUp(self):
00254         portal_membership = getToolByName(self.portal, 'portal_membership')
00255         portal_properties = getToolByName(self.portal, 'portal_properties')
00256         self.member = portal_membership.getAuthenticatedMember()
00257         self.props = portal_properties.site_properties

Here is the call graph for this function:

Definition at line 30 of file

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,
) [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

00027     def setRequestMethod(self, method):
00028'REQUEST_METHOD', method)
00029 = method

Here is the caller graph for this function:

Definition at line 35 of file

00036     def setupAuthenticator(self):
00037         name, token = self.getAuthenticator()
00038[name] = token

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 267 of file

00268     def testFailsWithMemberPropertyDisabled(self):
00269         # Should fail when member property is false
00270         self.member.setProperties(visible_ids=False)
00271         self.props.manage_changeProperties(visible_ids=True)
00272         self.failIf(self.portal.visibleIdsEnabled())

Definition at line 258 of file

00259     def testFailsWithSitePropertyDisabled(self):
00260         # Set baseline
00261         self.member.setProperties(visible_ids=False)
00262         self.props.manage_changeProperties(visible_ids=False)
00263         # Should fail when site property is set false
00264         self.failIf(self.portal.visibleIdsEnabled())
00265         self.member.setProperties(visible_ids=True)
00266         self.failIf(self.portal.visibleIdsEnabled())

Definition at line 273 of file

00274     def testSucceedsWithMemberAndSitePropertyEnabled(self):
00275         # Should succeed only when site property and member property are true
00276         self.props.manage_changeProperties(visible_ids=True)
00277         self.member.setProperties(visible_ids=True)
00278         self.failUnless(self.portal.visibleIdsEnabled())

Member Data Documentation

Definition at line 255 of file

Definition at line 256 of file

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