Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
CMFPlone.tests.testSyndicationTool.TestSyndicationTool Class Reference
Inheritance diagram for CMFPlone.tests.testSyndicationTool.TestSyndicationTool:
Inheritance graph
[legend]
Collaboration diagram for CMFPlone.tests.testSyndicationTool.TestSyndicationTool:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def testIsSiteSyndicationAllowed
def testIsSyndicationAllowed
def testGetSyndicatableContent
def testOwnerCanEnableAndDisableSyndication
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes

 syndication
 doc1
 doc2

Detailed Description

Definition at line 9 of file testSyndicationTool.py.


Member Function Documentation

Definition at line 11 of file testSyndicationTool.py.

00011 
00012     def afterSetUp(self):
00013         self.syndication = self.portal.portal_syndication
00014         self.folder.invokeFactory('Document','doc1')
00015         self.folder.invokeFactory('Document','doc2')
00016         self.doc1 = self.folder.doc1
00017         self.doc2 = self.folder.doc2
00018         #Enable syndication sitewide
00019         self.syndication.editProperties(isAllowed=True)
00020         #Enable syndication on folder
00021         self.syndication.enableSyndication(self.folder)

Definition at line 30 of file PloneTestCase.py.

00030 
00031     def getAuthenticator(self):
00032         tag = AuthenticatorView('context', 'request').authenticator()
00033         pattern = '<input .*name="(\w+)".*value="(\w+)"'
00034         return match(pattern, tag).groups()

Here is the call graph for this function:

Here is the caller graph for this function:

def CMFPlone.tests.PloneTestCase.PloneTestCase.setRequestMethod (   self,
  method 
) [inherited]
This is a stub now, but in case you want to try
   something fancy on Your Branch (tm), put it here.

Definition at line 26 of file PloneTestCase.py.

00026 
00027     def setRequestMethod(self, method):
00028         self.app.REQUEST.set('REQUEST_METHOD', method)
00029         self.app.REQUEST.method = method

Here is the caller graph for this function:

Definition at line 35 of file PloneTestCase.py.

00035 
00036     def setupAuthenticator(self):
00037         name, token = self.getAuthenticator()
00038         self.app.REQUEST.form[name] = token
00039 

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 36 of file testSyndicationTool.py.

00036 
00037     def testGetSyndicatableContent(self):
00038         content = self.syndication.getSyndicatableContent(self.folder)
00039         self.assertEqual(len(content),2)

Here is the call graph for this function:

Definition at line 22 of file testSyndicationTool.py.

00022 
00023     def testIsSiteSyndicationAllowed(self):
00024         # Make sure isSiteSyndicationAllowed returns proper value so that tabs
00025         # appear
00026         self.failUnless(self.syndication.isSiteSyndicationAllowed())
00027         self.syndication.editProperties(isAllowed=False)
00028         self.failIf(self.syndication.isSiteSyndicationAllowed())

Definition at line 29 of file testSyndicationTool.py.

00029 
00030     def testIsSyndicationAllowed(self):
00031         # Make sure isSyndicationAllowed returns proper value so that the
00032         # action appears
00033         self.failUnless(self.syndication.isSyndicationAllowed(self.folder))
00034         self.syndication.disableSyndication(self.folder)
00035         self.failIf(self.syndication.isSyndicationAllowed(self.folder))

Here is the call graph for this function:

Definition at line 40 of file testSyndicationTool.py.

00040 
00041     def testOwnerCanEnableAndDisableSyndication(self):
00042         self.setRoles(['Owner'])
00043         self.syndication.disableSyndication(self.folder)
00044         self.failIf(self.syndication.isSyndicationAllowed(self.folder))
00045         self.syndication.enableSyndication(self.folder)
00046         self.failUnless(self.syndication.isSyndicationAllowed(self.folder))
00047         self.logout()
00048         self.assertRaises(Unauthorized, self.syndication.enableSyndication,
00049                           self.folder)
00050         self.assertRaises(Unauthorized, self.syndication.disableSyndication,
00051                           self.folder)
00052 

Here is the call graph for this function:


Member Data Documentation

Definition at line 15 of file testSyndicationTool.py.

Definition at line 16 of file testSyndicationTool.py.

Definition at line 12 of file testSyndicationTool.py.


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