def _populate_special(self, obj): from Products.PluginIndexes.TextIndex.Vocabulary import Vocabulary self._populate(self._obj) obj._setObject('foo_vocabulary', Vocabulary('foo_vocabulary')) obj.addIndex('foo_text', 'TextIndex') obj.addColumn('bacon')
def setUp(self): from Products.PluginIndexes.TextIndex.Vocabulary import Vocabulary PlacelessSetup.setUp(self) zcml.load_config('meta.zcml', Products.Five) zcml.load_config('configure.zcml', Products.GenericSetup.PluginIndexes) self._obj = Vocabulary('foo_vocabulary') self._XML = _VOCABULARY_XML
def setUp(self): import Products.GenericSetup.PluginIndexes from Products.PluginIndexes.TextIndex.Vocabulary import Vocabulary NodeAdapterTestCase.setUp(self) zcml.load_config('configure.zcml', Products.GenericSetup.PluginIndexes) self._obj = Vocabulary('foo_vocabulary') self._XML = _VOCABULARY_XML
def __init__(self): ZCatalog.__init__(self, self.getId()) if not hasattr(self, 'Vocabulary'): # As of 2.6, the Catalog no longer adds a vocabulary in itself from Products.PluginIndexes.TextIndex.Vocabulary import Vocabulary vocabulary = Vocabulary('Vocabulary', 'Vocabulary', globbing=1) self._setObject('Vocabulary', vocabulary) self._initIndexes()
def setUp(self): from Products.PluginIndexes.TextIndex.Vocabulary import Vocabulary NodeAdapterTestCase.setUp(self) self._obj = Vocabulary('foo_vocabulary') self._XML = _VOCABULARY_XML