Back to index

plone3  3.1.7
Public Member Functions
plone.app.portlets.tests.test_classic_portlet.TestRenderer Class Reference
Inheritance diagram for plone.app.portlets.tests.test_classic_portlet.TestRenderer:
Inheritance graph
[legend]
Collaboration diagram for plone.app.portlets.tests.test_classic_portlet.TestRenderer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def renderer
def testUseMacro
def testPathExpression

Detailed Description

Definition at line 72 of file test_classic_portlet.py.


Member Function Documentation

Definition at line 74 of file test_classic_portlet.py.

00074 
00075     def afterSetUp(self):
00076         setHooks()
00077         setSite(self.portal)

Here is the call graph for this function:

def plone.app.portlets.tests.test_classic_portlet.TestRenderer.renderer (   self,
  context = None,
  request = None,
  view = None,
  manager = None,
  assignment = None 
)

Definition at line 78 of file test_classic_portlet.py.

00078 
00079     def renderer(self, context=None, request=None, view=None, manager=None, assignment=None):
00080         context = context or self.folder
00081         request = request or self.folder.REQUEST
00082         view = view or self.folder.restrictedTraverse('@@plone')
00083         manager = manager or getUtility(IPortletManager, name='plone.leftcolumn', context=self.portal)
00084         assignment = assignment or classic.Assignment(template='portlet_recent', macro='portlet')
00085 
00086         return getMultiAdapter((context, request, view, manager, assignment), IPortletRenderer)

Here is the call graph for this function:

Definition at line 93 of file test_classic_portlet.py.

00093 
00094     def testPathExpression(self):
00095         r = self.renderer(assignment=classic.Assignment(template='portlet_recent', macro='portlet'))
00096         self.assertEquals('context/portlet_recent/macros/portlet', r.path_expression())
00097         r = self.renderer(assignment=classic.Assignment(template='portlet_recent', macro=None))
00098         self.assertEquals('context/portlet_recent', r.path_expression())

Here is the call graph for this function:

Definition at line 87 of file test_classic_portlet.py.

00087 
00088     def testUseMacro(self):
00089         r = self.renderer(assignment=classic.Assignment(template='portlet_recent', macro='portlet'))
00090         self.assertEquals(True, r.use_macro())
00091         r = self.renderer(assignment=classic.Assignment(template='portlet_recent', macro=None))
00092         self.assertEquals(False, r.use_macro())

Here is the call graph for this function:


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