cheroot.test.helper module

A library of helper functions for the Cheroot test suite.

class cheroot.test.helper.CherootWebCase(methodName='runTest')

Bases: cheroot.test.webtest.WebCase

Helper class for a web app test suite.

assertEqualDates(dt1, dt2, seconds=None)

Assert abs(dt1 - dt2) is within Y seconds.

available_servers = {'native': <class 'cheroot.server.HTTPServer'>, 'wsgi': <class 'cheroot.wsgi.Server'>}
date_tolerance = 2
scheme = 'http'
script_name = ''
classmethod setup_class()

Create and run one HTTP server per class.

classmethod start()

Load and start the HTTP server.

classmethod stop()

Terminate HTTP server.

classmethod teardown_class()

Cleanup HTTP server.

class cheroot.test.helper.Controller

Bases: object

WSGI app for tests.

class cheroot.test.helper.Request(environ)

Bases: object

HTTP request container.

class cheroot.test.helper.Response

Bases: object

HTTP response container.

output()

Generate iterable response body object.