Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def populateSite
def testCreateBreadCrumbs
def testBreadcrumbsRespectTypesWithViewAction
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes


Detailed Description

Tests for the portal tabs query

Definition at line 528 of file

Member Function Documentation

Definition at line 531 of file

00532     def afterSetUp(self):
00533         self.utils = self.portal.plone_utils
00534         self.populateSite()

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:

Definition at line 535 of file

00536     def populateSite(self):
00537         self.setRoles(['Manager'])
00538         self.portal.invokeFactory('Folder', 'folder1')
00539         folder1 = getattr(self.portal, 'folder1')
00540         folder1.invokeFactory('Document', 'doc11')
00541         folder1.invokeFactory('File', 'file11')
00542         self.setRoles(['Member'])

Here is the call 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 552 of file

00553     def testBreadcrumbsRespectTypesWithViewAction(self):
00554         # With a type in typesUseViewActionInListings as current action it
00555         # should return a breadcrumb which has '/view' appended to the url
00556         file = self.portal.folder1.file11
00557         crumbs = self.utils.createBreadCrumbs(file)
00558         self.failUnless(crumbs)
00559         self.assertEqual(crumbs[-1]['absolute_url'][-5:],'/view')

Definition at line 543 of file

00544     def testCreateBreadCrumbs(self):
00545         # See if we can create one at all
00546         doc = self.portal.folder1.doc11
00547         crumbs = self.utils.createBreadCrumbs(doc)
00548         self.failUnless(crumbs)
00549         self.assertEqual(len(crumbs), 2)
00550         self.assertEqual(crumbs[-1]['absolute_url'], doc.absolute_url())
00551         self.assertEqual(crumbs[-2]['absolute_url'], doc.aq_parent.absolute_url())

Member Data Documentation

Definition at line 532 of file

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