Part of lp.testing
This browser performs actual socket connections to a real HTTP server. This is used in tests which utilize the AppServerLayer to run the app server in a child process. The Zope testing browser fakes its connections in-process, so that's not good enough.
The browser provided here extends
providing a close() method that delegates to the underlying mechanize browser,
and it tracks all Browser instances to ensure that they are closed. This
latter prevents open socket leaks even when the doctest doesn't explicitly
close or delete the browser instance.
|Class||SocketClosingOnErrorHandler||A handler that ensures that the socket gets closed on errors.|
|Class||Browser||A browser subclass that knows about basic auth.|
|Function||setUp||Set up appserver tests.|
|Function||tearDown||Tear down appserver tests.|