Back to index

plone3  3.1.7
Private Member Functions
CMFCore.exportimport.tests.test_catalog._CatalogToolSetup Class Reference
Inheritance diagram for CMFCore.exportimport.tests.test_catalog._CatalogToolSetup:
Inheritance graph
[legend]
Collaboration diagram for CMFCore.exportimport.tests.test_catalog._CatalogToolSetup:
Collaboration graph
[legend]

List of all members.

Private Member Functions

def _initSite

Detailed Description

Definition at line 76 of file test_catalog.py.


Member Function Documentation

Definition at line 78 of file test_catalog.py.

00078 
00079     def _initSite(self, foo=2):
00080         site = self.root.site = Folder(id='site')
00081         ctool = site.portal_catalog = CatalogTool()
00082 
00083         for obj_id in ctool.objectIds():
00084             ctool._delObject(obj_id)
00085         for idx_id in ctool.indexes():
00086             ctool.delIndex(idx_id)
00087         for col in ctool.schema()[:]:
00088             ctool.delColumn(col)
00089 
00090         if foo > 0:
00091             ctool._setObject('foo_plexicon', PLexicon('foo_plexicon'))
00092             lex = ctool.foo_plexicon
00093             lex._pipeline = (Splitter(), CaseNormalizer(), StopWordRemover())
00094 
00095             extra = _extra()
00096             extra.lexicon_id = 'foo_plexicon'
00097             extra.index_type = 'Okapi BM25 Rank'
00098             ctool.addIndex('foo_zctext', 'ZCTextIndex', extra)
00099 
00100             ctool.addColumn('foo_zctext')
00101 
00102         return site
00103 


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