l.t.browser : module documentation

Part of lp.testing

A real, socket connecting browser.

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 zope.testbrowser.testing.Browser by 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.
def setUp(test):
Set up appserver tests.
def tearDown(test):
Tear down appserver tests.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.