Back to index

plone3  3.1.7
Public Member Functions
plone.app.layout.links.tests.test_rssviewlet.TestRSSViewletView Class Reference
Inheritance diagram for plone.app.layout.links.tests.test_rssviewlet.TestRSSViewletView:
Inheritance graph
[legend]
Collaboration diagram for plone.app.layout.links.tests.test_rssviewlet.TestRSSViewletView:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def test_RSSViewlet

Detailed Description

Test the document by line viewlet

Definition at line 7 of file test_rssviewlet.py.


Member Function Documentation

Definition at line 11 of file test_rssviewlet.py.

00011 
00012     def afterSetUp(self):
00013         pass

Definition at line 14 of file test_rssviewlet.py.

00014 
00015     def test_RSSViewlet(self):
00016         syntool = getToolByName(self.portal, 'portal_syndication')
00017         if syntool.isSyndicationAllowed(self.portal):
00018             # make sure syndication is disabled
00019             self.loginAsPortalOwner()
00020             syntool.disableSyndication(self.portal)
00021             self.logout()
00022         request = self.app.REQUEST
00023         viewlet = RSSViewlet(self.portal, request, None, None)
00024         viewlet.update()
00025         result = viewlet.render()
00026         self.assertEquals(result.strip(), '')
00027         self.loginAsPortalOwner()
00028         syntool.enableSyndication(self.portal)
00029         self.logout()
00030         request = self.app.REQUEST
00031         viewlet = RSSViewlet(self.portal, request, None, None)
00032         viewlet.update()
00033         result = viewlet.render()
00034         self.failIf("<link" not in result)
00035         self.failIf("http://nohost/plone/RSS" not in result)
00036 

Here is the call graph for this function:


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