On 1/3/11 10:21 , ToutPT wrote:
> Hi,
>
> I don't understand why but my c.gallery functional tests just fail to
> run on plone4.
>
> traceback:
> Running Products.PloneTestCase.layer.PloneSite tests:
> Set up Testing.ZopeTestCase.layer.ZopeLite in 0.744 seconds.
> Set up Products.PloneTestCase.layer.ZCML in 2.288 seconds.
> Set up Products.PloneTestCase.layer.PloneSite Traceback (most recent
> call last):
> File
> "/home/jmf/.buildout/installed_eggs/zope.testing-3.9.4-py2.6.egg/zope/testing/testrunner/runner.py",
> line 367, in run_layer
> [....]
> File
> "/home/jmf/.buildout/installed_eggs/zope.component-3.7.1-py2.6.egg/zope/component/registry.py",
> line 389, in _getUtilityProvided
> "The utility doesn't provide a single interface "
> TypeError: The utility doesn't provide a single interface and no
> provided interface was specified.
You are trying to register a utility that provides multiple interfaces,
without selecting which one to use for the registration. Commonly this
is due to base classes. For example:
class BaseUtility(object):
implements(IUtility)
class MyUtility(BaseUtility)
implements(IOtherUtility)
<utility factory=".utils.MyUtility" />
if you explicitly tell the system which interface to use it will work:
<utility factory=".utils.MyUtility" provides=".utils.IOtherUtility" />
Wichert.
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers