Back to index

plone3  3.1.7
Public Member Functions
plone.portlet.static.tests.test_portlet_static.TestRenderer Class Reference
Inheritance diagram for plone.portlet.static.tests.test_portlet_static.TestRenderer:
Inheritance graph
[legend]
Collaboration diagram for plone.portlet.static.tests.test_portlet_static.TestRenderer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def renderer
def test_render
def test_available
def test_css_class

Detailed Description

Definition at line 66 of file test_portlet_static.py.


Member Function Documentation

Definition at line 68 of file test_portlet_static.py.

00068 
00069     def afterSetUp(self):
00070         self.setRoles(('Manager',))

Here is the call graph for this function:

def plone.portlet.static.tests.test_portlet_static.TestRenderer.renderer (   self,
  context = None,
  request = None,
  view = None,
  manager = None,
  assignment = None 
)

Definition at line 71 of file test_portlet_static.py.

00071 
00072     def renderer(self, context=None, request=None, view=None, manager=None, assignment=None):
00073         context = context or self.folder
00074         request = request or self.folder.REQUEST
00075         view = view or self.folder.restrictedTraverse('@@plone')
00076         manager = manager or getUtility(IPortletManager, name='plone.rightcolumn', context=self.portal)
00077         assignment = assignment or static.Assignment(header=u"title", text="text")
00078 
00079         return getMultiAdapter((context, request, view, manager, assignment), IPortletRenderer)

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 88 of file test_portlet_static.py.

00088 
00089     def test_available(self):
00090         r = self.renderer(
00091             context=self.portal,
00092             assignment=static.Assignment(header=u"title", text="<b>text</b>",
00093                                          hide=True))
00094         r = r.__of__(self.folder)
00095         r.update()
00096         self.failIf(r.available, "Renderer should not be available.")
        

Here is the call graph for this function:

Definition at line 97 of file test_portlet_static.py.

00097 
00098     def test_css_class(self):
00099         r = self.renderer(context=self.portal, 
00100                           assignment=static.Assignment(header=u"Welcome text", text="<b>text</b>"))
00101         self.assertEquals('portlet-static-welcome-text', r.css_class())
        

Here is the call graph for this function:

Definition at line 80 of file test_portlet_static.py.

00080 
00081     def test_render(self):
00082         r = self.renderer(context=self.portal, assignment=static.Assignment(header=u"title", text="<b>text</b>"))
00083         r = r.__of__(self.folder)
00084         r.update()
00085         output = r.render()
00086         self.failUnless('title' in output)
00087         self.failUnless('<b>text</b>' in output)

Here is the call graph for this function:


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