On Sun, 2006-19-11 at 14:37 +0100, Jens Vagelpohl wrote:
> Using just the ActionsTool right now in order to get that all set up  
> and then move to the other tools, I've gotten almost always there,  
> but there is one set of tests that refuse to run right now, the ones  
> in CMFCore.exportimport.tests.test_actions which derive from class  
> _ActionSetup.
> Here's the change I have made in the actions importer code so far:

<snipping some code...>

>       """Export actions tool.
>       """
>       site = context.getSite()
> - -    tool = getToolByName(site, 'portal_actions', None)
> +    tool = getUtility(IActionsTool, context=site)

This looks like it will be the new way of looking up CMF tools?  Looks
great.  But we shouldn't have to specify ``context=site`` should we?
getUtility should automatically figure out what the nearest chain of
sites should be and look for local utilities in each one of them
automatically no?

- Rocky

Rocky Burt
ServerZen Software -- http://www.serverzen.com
News About The Server (blog) -- http://www.serverzen.net

Attachment: signature.asc
Description: This is a digitally signed message part

Zope-CMF maillist  -  Zope-CMF@lists.zope.org

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to