twisted.web.test.test_wsgi.WSGITestsMixin class documentationtwisted.web.test.test_wsgi
(View In Hierarchy)
Known subclasses: twisted.web.test.test_wsgi.ApplicationTests, twisted.web.test.test_wsgi.EnvironTests, twisted.web.test.test_wsgi.InputStreamTestMixin, twisted.web.test.test_wsgi.StartResponseTests
| Instance Variable | channelFactory | A no-argument callable which will be invoked to create a new HTTP channel to associate with request objects. | 
| Method | setUp | Undocumented | 
| Method | lowLevelRender | |
| Method | render | Undocumented | 
| Method | requestFactoryFactory | Undocumented | 
| Method | getContentFromResponse | Undocumented | 
| Method | prepareRequest | Prepare a Requestwhich, when
a request is received, captures theenvironandstart_responsecallable passed to a WSGI app. | 
| Parameters | method | A strgiving the request method to use. | 
| version | A strlike'1.1'giving the request version. | |
| resourceSegments | A listof unencoded path segments which specifies the location
in the resource hierarchy at which theWSGIResourcewill be placed, eg['']for /,['foo', 'bar', 
'']for /foo/bar/, etc. | |
| requestSegments | A listof unencoded path segments giving the request URI. | |
| query | A listof two-tuples ofstrgiving unencoded 
query argument keys and values. | |
| headers | A listof two-tuples ofstrgiving request header
names and corresponding values. | |
| safe | A strgiving the bytes which are to be considered safe 
for inclusion in the request URI and not quoted. | |
| Returns | A Deferredwhich 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). | |
Prepare a Request which, when
a request is received, captures the environ and 
start_response callable passed to a WSGI app.
| Parameters | application | An optional WSGI application callable that accepts the familiar environandstart_responseargs and returns an 
iterable of body content. If not supplied,start_responsewill
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 TwistedRequest. The latter
is aDeferredwhich
will be called back with a two-tuple of the arguments passed to a WSGI 
application (i.e. theenvironandstart_responsecallable), or will errback with any error arising within the WSGI app. | |