Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def renderer
def test_review_items
def test_full_news_link

Detailed Description

Definition at line 65 of file test_review_portlet.py.


Member Function Documentation

Definition at line 67 of file test_review_portlet.py.

00067 
00068     def afterSetUp(self):
00069         setHooks()
00070         setSite(self.portal)
00071         self.setRoles(['Manager'])
00072         self.portal.invokeFactory('Document', 'doc1')
00073         self.portal.invokeFactory('Document', 'doc2')

Here is the call graph for this function:

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

Definition at line 74 of file test_review_portlet.py.

00074 
00075     def renderer(self, context=None, request=None, view=None, manager=None, assignment=None):
00076         context = context or self.folder
00077         request = request or self.folder.REQUEST
00078         view = view or self.folder.restrictedTraverse('@@plone')
00079         manager = manager or getUtility(IPortletManager, name='plone.rightcolumn', context=self.portal)
00080         assignment = assignment or review.Assignment()
00081 
00082         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 91 of file test_review_portlet.py.

00091 
00092     def test_full_news_link(self):
00093         r = self.renderer(assignment=review.Assignment())
00094         self.failUnless(r.full_review_link().endswith('/full_review_list'))

Here is the call graph for this function:

Definition at line 83 of file test_review_portlet.py.

00083 
00084     def test_review_items(self):
00085         r = self.renderer(assignment=review.Assignment())
00086         self.assertEquals(0, len(r.review_items()))
00087         wf = getToolByName(self.portal, 'portal_workflow')
00088         wf.doActionFor(self.portal.doc1, 'submit')
00089         r = self.renderer(assignment=review.Assignment())
00090         self.assertEquals(1, len(r.review_items()))

Here is the call graph for this function:


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