class documentation
Method getContentFromResponse Undocumented
Method lowLevelRender No summary
Method prepareRequest Prepare a Request which, when a request is received, captures the environ and start_response callable passed to a WSGI app.
Method render Undocumented
Method requestFactoryFactory Undocumented
Method setUp Undocumented
Instance Variable channelFactory A no-argument callable which will be invoked to create a new HTTP channel to associate with request objects.
Instance Variable reactor Undocumented
Instance Variable threadpool Undocumented
def getContentFromResponse(self, response): (source)

Undocumented

def lowLevelRender(self, requestFactory, applicationFactory, channelFactory, method, version, resourceSegments, requestSegments, query=None, headers=[], body=None, safe=''): (source)
Parameters
requestFactoryUndocumented
applicationFactoryUndocumented
channelFactoryUndocumented
methodA str giving the request method to use.
versionA str like '1.1' giving the request version.
resourceSegmentsA list of unencoded path segments which specifies the location in the resource hierarchy at which the WSGIResource will be placed, eg [''] for /, ['foo', 'bar', ''] for /foo/bar/, etc.
requestSegmentsA list of unencoded path segments giving the request URI.
queryA list of two-tuples of str giving unencoded query argument keys and values.
headersA list of two-tuples of str giving request header names and corresponding values.
bodyUndocumented
safeA str giving the bytes which are to be considered safe for inclusion in the request URI and not quoted.
Returns
A Deferred which will be called back with a two-tuple of the arguments passed which would be passed to the WSGI application object for this configuration and request (ie, the environment and start_response callable).
def prepareRequest(self, application=None): (source)

Prepare a Request which, when a request is received, captures the environ and start_response callable passed to a WSGI app.

Parameters
applicationAn optional WSGI application callable that accepts the familiar environ and start_response args and returns an iterable of body content. If not supplied, start_response will be called with a "200 OK" status and no headers, and no content will be yielded.
Returns
A two-tuple of (request, deferred). The former is a Twisted Request. The latter is a Deferred which will be called back with a two-tuple of the arguments passed to a WSGI application (i.e. the environ and start_response callable), or will errback with any error arising within the WSGI app.
def render(self, *a, **kw): (source)

Undocumented

def requestFactoryFactory(self, requestClass=Request): (source)

Undocumented

def setUp(self): (source)

Undocumented

channelFactory = (source)

A no-argument callable which will be invoked to create a new HTTP channel to associate with request objects.