Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testVisibleIsDefault
def testVisibleCanBeFound
def testVisibleIsUnindexed
def testPrivateCanBeFound
def testPrivateIsUnindexed
def testPendingCanBeFound
def testPendingIsUnindexed
def testPublishedCanBeFound
def testPublishedIsUnindexed
def testPublishedIsUnindexedIfOwnerDeletes
def testPublishedIsUnindexedByFolderDeleteScript
def testPublishedIsUnindexedWhenDeletingParentFolder
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes

 catalog
 workflow

Detailed Description

Definition at line 712 of file testCatalogTool.py.


Member Function Documentation

Definition at line 716 of file testCatalogTool.py.

00716 
00717     def afterSetUp(self):
00718         self.catalog = self.portal.portal_catalog
00719         self.workflow = self.portal.portal_workflow
00720         self.folder.invokeFactory('Document', id='doc')
00721         self.setupAuthenticator()

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 742 of file testCatalogTool.py.

00742 
00743     def testPendingCanBeFound(self):
00744         self.workflow.doActionFor(self.folder.doc, 'submit')
00745         self.failUnless(self.catalog(getId='doc'))

Definition at line 746 of file testCatalogTool.py.

00746 
00747     def testPendingIsUnindexed(self):
00748         self.workflow.doActionFor(self.folder.doc, 'submit')
00749         self.folder._delObject('doc')
00750         self.failIf(self.catalog(getId='doc'))

Definition at line 733 of file testCatalogTool.py.

00733 
00734     def testPrivateCanBeFound(self):
00735         self.workflow.doActionFor(self.folder.doc, 'hide')
00736         self.failUnless(self.catalog(getId='doc'))

Definition at line 737 of file testCatalogTool.py.

00737 
00738     def testPrivateIsUnindexed(self):
00739         self.workflow.doActionFor(self.folder.doc, 'hide')
00740         self.folder._delObject('doc')
00741         self.failIf(self.catalog(getId='doc'))

Definition at line 751 of file testCatalogTool.py.

00751 
00752     def testPublishedCanBeFound(self):
00753         self.setRoles(['Manager'])
00754         self.workflow.doActionFor(self.folder.doc, 'publish')
00755         self.failUnless(self.catalog(getId='doc'))

Here is the call graph for this function:

Definition at line 756 of file testCatalogTool.py.

00756 
00757     def testPublishedIsUnindexed(self):
00758         # Works here!
00759         self.setRoles(['Manager'])
00760         self.workflow.doActionFor(self.folder.doc, 'publish')
00761         self.folder._delObject('doc')
00762         self.failIf(self.catalog(getId='doc'))

Here is the call graph for this function:

Definition at line 771 of file testCatalogTool.py.

00771 
00772     def testPublishedIsUnindexedByFolderDeleteScript(self):
00773         # Works here too!
00774         self.setRoles(['Manager'])
00775         self.workflow.doActionFor(self.folder.doc, 'publish')
00776         self.setRoles(['Member'])
00777         doc_path = '/'.join(self.folder.doc.getPhysicalPath())
00778         self.app.REQUEST.set('paths', [doc_path])
00779         # folder_delete requires a non-GET request
00780         self.setRequestMethod('POST')
00781         self.folder.folder_delete()
00782         self.setRequestMethod('GET')
00783         self.failIf(self.catalog(getId='doc'))

Here is the call graph for this function:

Definition at line 763 of file testCatalogTool.py.

00763 
00764     def testPublishedIsUnindexedIfOwnerDeletes(self):
00765         # Works here!
00766         self.setRoles(['Manager'])
00767         self.workflow.doActionFor(self.folder.doc, 'publish')
00768         self.setRoles(['Member'])
00769         self.folder._delObject('doc')
00770         self.failIf(self.catalog(getId='doc'))

Here is the call graph for this function:

Definition at line 784 of file testCatalogTool.py.

00784 
00785     def testPublishedIsUnindexedWhenDeletingParentFolder(self):
00786         # Works here too!
00787         self.setRoles(['Manager'])
00788         self.workflow.doActionFor(self.folder.doc, 'publish')
00789         self.setRoles(['Member'])
00790         self.folder.aq_parent._delObject(self.folder.getId())
00791         self.failIf(self.catalog(getId='doc'))
00792 

Here is the call graph for this function:

Definition at line 726 of file testCatalogTool.py.

00726 
00727     def testVisibleCanBeFound(self):
00728         self.failUnless(self.catalog(getId='doc'))

Definition at line 722 of file testCatalogTool.py.

00722 
00723     def testVisibleIsDefault(self):
00724         state = self.workflow.getInfoFor(self.folder.doc, 'review_state')
00725         self.assertEqual(state, 'visible')

Definition at line 729 of file testCatalogTool.py.

00729 
00730     def testVisibleIsUnindexed(self):
00731         self.folder._delObject('doc')
00732         self.failIf(self.catalog(getId='doc'))


Member Data Documentation

Definition at line 717 of file testCatalogTool.py.

Definition at line 718 of file testCatalogTool.py.


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