Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testCanPastePortalIfLexiconExists
def testCanPasteCatalog
def testPastingCatalogPreservesTextIndexes
def testCanRenamePortalIfLexiconExists
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes

 catalog

Detailed Description

Definition at line 668 of file testCatalogTool.py.


Member Function Documentation

Definition at line 670 of file testCatalogTool.py.

00670 
00671     def afterSetUp(self):
00672         self.catalog = self.portal.portal_catalog

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

00682 
00683     def testCanPasteCatalog(self):
00684         # Should be able to copy/paste a portal_catalog. Triggers
00685         # manage_afterAdd of portal_catalog thereby exposing another bug :-/
00686         self.setRoles(['Manager'])
00687         self.catalog.__replaceable__ = REPLACEABLE
00688         cb = self.portal.manage_copyObjects(['portal_catalog'])
00689         self.folder.manage_pasteObjects(cb)
00690         self.failUnless(hasattr(aq_base(self.folder), 'portal_catalog'))

Here is the call graph for this function:

Definition at line 673 of file testCatalogTool.py.

00673 
00674     def testCanPastePortalIfLexiconExists(self):
00675         # Should be able to copy/paste a portal containing
00676         # a catalog tool. Triggers manage_afterAdd of portal_catalog
00677         # thereby exposing a bug which is now going to be fixed.
00678         self.loginAsPortalOwner()
00679         cb = self.app.manage_copyObjects([portal_name])
00680         self.app.manage_pasteObjects(cb)
00681         self.failUnless(hasattr(self.app, 'copy_of_'+portal_name))

Here is the call graph for this function:

Definition at line 703 of file testCatalogTool.py.

00703 
00704     def testCanRenamePortalIfLexiconExists(self):
00705         # Should be able to rename a Plone portal
00706         # This test is to demonstrate that http://dev.plone.org/plone/ticket/1745
00707         # is fixed and can be closed.
00708         self.loginAsPortalOwner()
00709         self.app.manage_renameObjects([portal_name], ['foo'])
00710         self.failUnless(hasattr(self.app, 'foo'))
00711 

Here is the call graph for this function:

Definition at line 691 of file testCatalogTool.py.

00691 
00692     def testPastingCatalogPreservesTextIndexes(self):
00693         # Pasting the catalog should not cause indexes to be removed.
00694         self.setRoles(['Manager'])
00695         self.catalog.__replaceable__ = REPLACEABLE
00696         cb = self.portal.manage_copyObjects(['portal_catalog'])
00697         self.folder.manage_pasteObjects(cb)
00698         self.failUnless(hasattr(aq_base(self.folder), 'portal_catalog'))
00699         cat = self.folder.portal_catalog
00700         self.failUnless('SearchableText' in cat.indexes())
00701         # CMF added lexicons should stick around too
00702         self.failUnless(hasattr(aq_base(cat), 'plaintext_lexicon'))

Here is the call graph for this function:


Member Data Documentation

Definition at line 671 of file testCatalogTool.py.


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