What about using zope.app.component.hooks.setSite? It sets the site on
a zope.thread.local based object, and I believe most utility lookups
fall back on that setting if context is not supplied. setSite is
called when a site is traversed through, via a BeforeTraverseEvent.
It's cleared at the end of a request. Maybe the tests should be
setting the site, since when accessed "through the web", 'testsite'
will be set as the local site by the event subscriber?
On 1/3/06, Stephan Richter <[EMAIL PROTECTED]> wrote:
> On Wednesday 16 November 2005 10:13, Andreas Elvers wrote:
> > Anyway I have created a functional unit test to demonstrate the problem.
> > In fact
> > the unit test shows that sqlos will always lookup global utilities and
> > never local utilities.
> > Here is the test. It will fail in the last block on
> > "testsite['personcontainer'] = personcontainer".
> I think this example is probably most useful to the SQLOS developers. You
> might want to resend it to them. I am not using SQLOS (I do not even have it
> installed), so I cannot help you.
> Stephan Richter
> CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
> Web2k - Web Software Design, Development and Training
> Zope3-users mailing list
Zope3-users mailing list