[Zope-dev] makerequest issues

Stefan H. Holek stefan at epy.co.at
Tue Apr 4 14:09:05 EDT 2006


On 4. Apr 2006, at 16:53, Paul Winkler wrote:

> Hmmm, but unit tests very often don't reflect "reality" -  
> deliberately!
> Because "reality" is Too Much Stuff.
>

True enough.

> Any other opinions on this?  Do we really need to require an App at
> the root any time we want to acquire REQUEST? That seems kind of
> arbitrary to me when any acquisition-enabled object would do. I've
> inherited a test suite that has a lot of stuff like:
>
>         parent = makerequest(Folder())
>
> ... and I don't see anything wrong with that in principle,
> but if the concensus is that Stefan's right, I'll bow to that.

This looks fine to me because the world ends at parent. Your earlier  
example wrapped an object that was in the middle of an acquisition  
chain (IIRC), which I am not sure I like. You are safe to wrap the  
top-most object, be it a true "app" or not.

Stefan

--
Anything that happens, happens.  --Douglas Adams




More information about the Zope-Dev mailing list