Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Private Member Functions Class Reference
Inheritance diagram for
Inheritance graph
Collaboration diagram for
Collaboration graph

List of all members.

Public Member Functions

def setUp
def testInterface
def testSimpleAction
def testViewAction
def testNonExisting

Public Attributes


Private Member Functions

def _getMenuItemByAction

Detailed Description

Definition at line 497 of file

Member Function Documentation

Definition at line 508 of file

00509     def _getMenuItemByAction(self, action):
00510         from zope.publisher.browser import TestRequest
00511         context = dummy.Dummy()
00512         request = TestRequest()
00513         return, request, action)

Here is the caller graph for this function:

Definition at line 499 of file

00500     def setUp(self):
00501         from Products.Five import zcml
00502         import Products.Five
00503         import
00504         zcml.load_config("meta.zcml", Products.Five)
00505         zcml.load_config('configure.zcml',
00506         zcml.load_config('tests.zcml',
00507 = getUtility(IBrowserMenu, 'plone_displayviews')

A DisplayViewsMenu implements an extended interface

Definition at line 514 of file

00515     def testInterface(self):
00516         """A DisplayViewsMenu implements an extended interface"""
00517         from interfaces import IDisplayViewsMenu
00518         self.assertTrue(IDisplayViewsMenu.providedBy(

Attempt to retrieve a non-registered IBrowserMenuItem

Definition at line 536 of file

00537     def testNonExisting(self):
00538         """Attempt to retrieve a non-registered IBrowserMenuItem"""
00539         item = self._getMenuItemByAction('nonesuch.html')
00540         self.assertTrue(item is None)

Here is the call graph for this function:

Retrieve a registered IBrowserMenuItem

Definition at line 519 of file

00520     def testSimpleAction(self):
00521         """Retrieve a registered IBrowserMenuItem"""
00522         item = self._getMenuItemByAction('foo.html')
00523         self.assertFalse(item is None)
00524         self.assertEqual(item.title, 'Test Menu Item')

Here is the call graph for this function:

Retrieve a registered IBrowserMenuItem

Definition at line 525 of file

00526     def testViewAction(self):
00527         """Retrieve a registered IBrowserMenuItem"""
00528         item = self._getMenuItemByAction('bar.html')
00529         self.assertFalse(item is None)
00530         self.assertEqual(item.title, 'Another Test Menu Item')
00532         item = self._getMenuItemByAction('@@bar.html')
00533         self.assertEqual(item.title, 'Another Test Menu Item')
00534         item = self._getMenuItemByAction('++view++bar.html')
00535         self.assertEqual(item.title, 'Another Test Menu Item')

Here is the call graph for this function:

Member Data Documentation

Definition at line 506 of file

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