[Zope-dev] makerequest issues

Paul Winkler pw_lists at slinkp.com
Tue Apr 4 10:53:49 EDT 2006


On Sat, Apr 01, 2006 at 01:07:35PM +0200, Stefan H. Holek wrote:
> I don't think makerequest is intended for wrapping anything but the  
> root application object. Putting the RequestContainer on arbitrary  
> objects doesn't feel right and certainly isn't how Zope does it, i.e.  
> you get a test fixture that doesn't reflect "reality".
> 
> NotABug/WontFix ;-)

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

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.

-- 

Paul Winkler
http://www.slinkp.com


More information about the Zope-Dev mailing list