[Zope-CMF] Re: Tools as local utilities

Rocky Burt rocky at serverzen.com
Sun Nov 19 13:26:01 EST 2006


On Sun, 2006-19-11 at 12:59 -0500, Tres Seaver wrote:
> Rocky Burt wrote:
> >  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?
> 
> That won't work unless the tests set up the thread-local site in the
> same way that the publisher does.

Right, but the code mentioned earlier was in code that is expected to
run in testing and non-testing environments alike.  So it definitely
shouldn't use the context parameter and the tests should accommodate
accordingly (by setting up the thread-local site or whatever).

- Rocky

-- 
Rocky Burt
ServerZen Software -- http://www.serverzen.com
News About The Server (blog) -- http://www.serverzen.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/zope-cmf/attachments/20061119/75ce4023/attachment.bin


More information about the Zope-CMF mailing list