Florent Guillaume wrote: > Some CMF 1.6 and 2.0 (and I guess trunk) tests are failing in Zope 2.10 > due to missing adapters somewhere. Example, when it tries to evaluate > the path 'info/id' (where info is a dict): > > Error in test test_generateWorkflowXML_multiple > (Products.DCWorkflow.tests.test_exportimport.WorkflowDefinitionConfiguratorTests) > > Traceback (most recent call last): > ... > File > "/Users/fg/zope/zope2-zope/lib/python/Products/PageTemplates/Expressions.py", > line 121, in _eval > ob = self._subexprs[-1](econtext) > File "/Users/fg/zope/zope2-zope/lib/python/zope/tales/expressions.py", > line 124, in _eval > ob = self._traverser(ob, element, econtext) > File > "/Users/fg/zope/zope2-zope/lib/python/Products/PageTemplates/Expressions.py", > line 73, in boboAwareZopeTraverse > request=request) > File > "/Users/fg/zope/zope2-zope/lib/python/zope/traversing/adapters.py", line > 161, in traversePathElement > raise TraversalError('No traversable adapter found', obj) > TraversalError: ('No traversable adapter found', {'state_variable': > 'state', 'state_info': [...], ...}) > > Does anyone have an idea which adapters are missing, and where to add > them in the tests?
Yup. I bet you just need to do zope.component.provideAdapter(zope.traversing.adapters.DefaultTraversable). The Zope 3 page template engine will use ITraversable adapters to traverse just about anything. So, basically, wherever you're employing a page template in CMF tests, you'll want this adapter. Philipp _______________________________________________ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests