Hello,<br><br>I have created a ZCatalog object where I declare the following index:<br>self.addIndex('featureType','FieldIndex')<br><br>which works fine in my application<br><br>But when I run it in my unit tests, I get the following error:
<br> self.addIndex('featureType','FieldIndex')<br> File "/opt/Plone3/lib/python/Products/ZCatalog/ZCatalog.py", line 971, in<br>addIndex<br> raise ValueError, "Index of type %s not found" % type
<br> ValueError: Index of type FieldIndex not found<br><br>I am using the unitest package, I have declare a lot of stuff in configurationSetUp, but something is probably missing:<br>(is there something to import from PluginIndexes ?)
<br><br>import unittest<br><br>from zope.component.testing import setUp, tearDown<br>from zope.configuration.xmlconfig import XMLConfig<br>from zope.testing import doctest<br>from zope.testing.doctestunit import DocFileSuite
<br><br><br>def configurationSetUp(self):<br> setUp()<br> import Products.zgeo<br> import zope.component<br> import zope.annotation<br> import zope.app.publisher.browser<br> import Products.Five<br> import
Products.Archetypes<br> import Products.CMFCore<br> import Products.GenericSetup<br> XMLConfig('meta.zcml', zope.component)()<br> XMLConfig('meta.zcml', zope.app.publisher.browser)()<br> XMLConfig('
meta.zcml', Products.Five)()<br> XMLConfig('meta.zcml', Products.GenericSetup)()<br> XMLConfig('meta.zcml', Products.CMFCore)()<br> XMLConfig('configure.zcml', zope.annotation)()<br> XMLConfig('
configure.zcml', Products.Five)()<br> XMLConfig('configure.zcml', Products.GenericSetup)()<br> XMLConfig('configure.zcml', Products.Archetypes)()<br> XMLConfig('configure.zcml', Products.zgeo
)()<br><br>Thanks,<br><br>Eric<br>