Esempio n. 1
0
    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')
Esempio n. 2
0
    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
Esempio n. 3
0
    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
Esempio n. 4
0
    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()
Esempio n. 5
0
    def setUp(self):
        from Products.PluginIndexes.TextIndex.Vocabulary import Vocabulary

        NodeAdapterTestCase.setUp(self)
        self._obj = Vocabulary('foo_vocabulary')
        self._XML = _VOCABULARY_XML