Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def renderer
def testAvailable
def testShow

Detailed Description

Definition at line 71 of file test_login_portlet.py.


Member Function Documentation

Definition at line 73 of file test_login_portlet.py.

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

Here is the call graph for this function:

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

Definition at line 77 of file test_login_portlet.py.

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

Here is the call graph for this function:

Definition at line 86 of file test_login_portlet.py.

00086 
00087     def testAvailable(self):
00088         request = self.folder.REQUEST
00089         r = self.renderer()
00090         self.assertEquals(False, r.available)
00091         self.logout()
00092         del request.__annotations__
00093         r = self.renderer()
00094         self.assertEquals(True, r.available)
00095         self.portal.acl_users._delObject('credentials_cookie_auth')
00096         r = self.renderer()
00097         del request.__annotations__
00098         self.assertEquals(False, r.available)
00099         

Here is the call graph for this function:

Definition at line 100 of file test_login_portlet.py.

00100 
00101     def testShow(self):
00102         request = self.folder.REQUEST
00103         
00104         r = self.renderer()
00105         self.assertEquals(False, r.show())
00106         
00107         self.logout()
00108         
00109         del request.__annotations__
00110         self.assertEquals(True, r.show())
00111         
00112         del request.__annotations__
00113         request['URL'] = self.portal.absolute_url() + '/login_form'
00114         self.assertEquals(False, self.renderer(request=request).show())
00115 
00116         del request.__annotations__
00117         request['URL'] = self.portal.absolute_url() + '/join_form'
00118         self.assertEquals(False, self.renderer(request=request).show())

Here is the call graph for this function:


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