On Thu, Mar 03, 2011 at 11:04:12AM +0100, Sylvain Viollon wrote: > On Wed, 02 Mar 2011 09:16:14 +0100 > Wolfgang Schnerring <w...@gocept.com> wrote: > > > Hello Brian, > > > > Hello, > > > it's taken a while, but I finally had a chance to review your > > branch(es). > > > > * Brian Sutherland <br...@vanguardistas.net> [2011-02-12 18:57]: > > >> > On Tue, Feb 01, 2011 at 09:32:11AM +0100, Wolfgang Schnerring > > >> > wrote: > > >> >> I'd prefer if we treated this as two separate steps, then: > > >> >> a) improve the testbrwoser+wsgi story by replacing > > >> >> wsgi_intercept with WebTest > > > > > > I pulled this out of my original branch and put it here: > > > > > > svn+ssh://svn.zope.org/repos/main/zope.testbrowser/jinty-webtest3-minimal > > > > Thanks, that helped me understand what's going on much better. > > > > I do have a few questions about this part: > > > > - Does the (webtest-based) wsgi.Browser behave similarly to the > > Publisher-Browser? > > > > When we ported the wsgi_intercept variant from zope.app.wsgi, we found > > that there were some idiosyncracies woven in that people may rely on. > > This kind of stuff of course isn't documented, and we didn't do much > > research, but rather took care to port what we found in zope.app.wsgi, > > namely filtering some HTTP headers from the response (meh, doesn't > > feel important), and handling Basic Auth headers (that feels > > important to preserve). > > > > > > Don't forget the support to do handleErrors = False. It is I think > one of the most important, which help to debug the tests.
That's supported for both zope.app.wsgi and Paste applications. YMMV for other WSGI applications. > In zope.app.wsgi all those idiosyncracies are more or less handled by > a WSGI middleware. I guess you can reuse it. > > One of the purpose of the zope.app.wsgi implementation was to be able > to convert the existing tests just by changing the import, and get > ride of zope.testbrowser dependencies on the crazy zope.app.testing > nobody-knows-what-it-does-and-does-everything in Grok (without adding > many others). Which worked perfectly. I'll definitely look into reusing the middleware. But, tell me, how do I run all the grok tests? (So I can see what idiosyncracies are required) > Regards, > > Sylvain, > > -- > Sylvain Viollon -- Infrae > t +31 10 243 7051 -- http://infrae.com > Hoevestraat 10 3033GC Rotterdam -- The Netherlands > _______________________________________________ > Zope-Dev maillist - Zope-Dev@zope.org > https://mail.zope.org/mailman/listinfo/zope-dev > ** No cross posts or HTML encoding! ** > (Related lists - > https://mail.zope.org/mailman/listinfo/zope-announce > https://mail.zope.org/mailman/listinfo/zope ) -- Brian Sutherland _______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )