Hello,<br><br>I have created a ZCatalog object where I declare the following index:<br>self.addIndex(&#39;featureType&#39;,&#39;FieldIndex&#39;)<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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.addIndex(&#39;featureType&#39;,&#39;FieldIndex&#39;)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; File &quot;/opt/Plone3/lib/python/Products/ZCatalog/ZCatalog.py&quot;, line 971, in<br>addIndex<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; raise ValueError, &quot;Index of type %s not found&quot; % type
<br>&nbsp;&nbsp;&nbsp; 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>&nbsp;&nbsp;&nbsp; setUp()<br>&nbsp;&nbsp;&nbsp; import Products.zgeo<br>&nbsp;&nbsp;&nbsp; import zope.component<br>&nbsp;&nbsp;&nbsp; import zope.annotation<br>&nbsp;&nbsp;&nbsp; import zope.app.publisher.browser<br>&nbsp;&nbsp;&nbsp; import Products.Five<br>&nbsp;&nbsp;&nbsp; import 
Products.Archetypes<br>&nbsp;&nbsp;&nbsp; import Products.CMFCore<br>&nbsp;&nbsp;&nbsp; import Products.GenericSetup<br>&nbsp;&nbsp;&nbsp; XMLConfig(&#39;meta.zcml&#39;, zope.component)()<br>&nbsp;&nbsp;&nbsp; XMLConfig(&#39;meta.zcml&#39;, zope.app.publisher.browser)()<br>&nbsp;&nbsp;&nbsp; XMLConfig(&#39;
meta.zcml&#39;, Products.Five)()<br>&nbsp;&nbsp;&nbsp; XMLConfig(&#39;meta.zcml&#39;, Products.GenericSetup)()<br>&nbsp;&nbsp;&nbsp; XMLConfig(&#39;meta.zcml&#39;, Products.CMFCore)()<br>&nbsp;&nbsp;&nbsp; XMLConfig(&#39;configure.zcml&#39;, zope.annotation)()<br>&nbsp;&nbsp;&nbsp; XMLConfig(&#39;
configure.zcml&#39;, Products.Five)()<br>&nbsp;&nbsp;&nbsp; XMLConfig(&#39;configure.zcml&#39;, Products.GenericSetup)()<br>&nbsp;&nbsp;&nbsp; XMLConfig(&#39;configure.zcml&#39;, Products.Archetypes)()<br>&nbsp;&nbsp;&nbsp; XMLConfig(&#39;configure.zcml&#39;, Products.zgeo
)()<br><br>Thanks,<br><br>Eric<br>