Re: zope.testbrowser and WebTest (round 2)

Brian Sutherland <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <[email protected]>
On Sat, Mar 05, 2011 at 01:07:58AM +0100, Jan-Jaap Driessen wrote:
> To get the groktoolkit tests and my company's applications to run with
> Brian's zope.testbrowser+webtest branch I did the following things:
> 
> * I created a branch of zope.app.wsgi trunk [1] to which I copied the
> AuthorizationMiddleware from zope.testbrowser trunk (moved there in
> [2]). The three middleware components (Transaction, Authorization and
> HandleErrors) are needed to make the groktoolkit tests pass. The
> AuthorizationMiddleware is not available on Brian's branch, but is
> available on zope.testbrowser trunk. If we can land this middleware in
> zope.testbrowser, we can again remove it from zope.app.wsgi.testlayer.
> In my opinion, this middleware should be part of zope.testbrowser,
> because handleErrors is part of the IBrowser interface.
> 
> * The `http caller` in zope.app.wsgi.testlayer is used in
> grokcore.rest. On my branch, I rewrote the http caller to use WebTest
> and _APP_UNDER_TEST instead of wsgi_intercept. The import from
> zope.testbrowser is bothering me; can we put the http caller in
> zope.testbrowser? The http caller returns a FakeResponse instance,
> which could very well be a WebTest TestResponse. The FakeResponse
> wrapper is merely used to fix the current tests.
> 
> * I fixed some tests in grok and grokcore.rest to use the
> WebTest-style http caller.

I was pretty sure you wouldn't mind so I committed a few cleanups and
bugfixes to your zope.app.wsgi branch.

The trunk ztk and zopeapp tests now also pass with the three branches.

-- 
Brian Sutherland
_______________________________________________
Zope-Dev maillist  -  [email protected]
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 )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.