module documentation
Tests for twisted.web._newclient
.
Class |
|
Tests for the HTTP 1.1 client protocol implementation, HTTP11ClientProtocol . |
Class |
|
Tests for HTTPClientParser which is responsible for parsing HTTP response messages. |
Class |
|
_HTTPParserTests using bare LF newlines. |
Class |
|
_HTTPParserTests using standard CR LF newlines. |
Class |
|
Tests for LengthEnforcingConsumer . |
Class |
|
Tests for makeStatefulDispatcher . |
Class |
|
Tests for ChunkedEncoder which sits between an ITransport and a request/response body producer and chunked encodes everything written to it. |
Class |
|
Tests for Request . |
Class |
|
Tests for Response . |
Class |
|
SimpleRequest is a fake implementation of Request which writes a short, fixed string to the transport passed to its writeTo method and returns a succeeded Deferred . This vaguely emulates the behavior of a ... |
Class |
|
SlowRequest is a fake implementation of Request which is easily controlled externally (for example, by code in a test method). |
Class |
|
StringProducer is a dummy body producer. |
Class |
|
Tests for TransportProxyProducer which proxies the IPushProducer interface of a transport. |
Exception |
|
Similar to ArbitraryException but with a different identity. |
Exception |
|
A unique, arbitrary exception type which twisted.web._newclient knows nothing about. |
Function | assert |
A simple helper to invoke assertWrapperExceptionTypes with a mainType of RequestGenerationFailed . |
Function | assert |
A simple helper to invoke assertWrapperExceptionTypes with a mainType of RequestTransmissionFailed . |
Function | assert |
A simple helper to invoke assertWrapperExceptionTypes with a mainType of ResponseFailed . |
Function | assert |
Assert that the given Deferred fails with the exception given by mainType and that the exceptions wrapped by the instance of mainType it fails with match the list of exception types given by reasonTypes... |
Function | just |
Helper function for creating a Response which uses the given transport. All of the other parameters to Response.__init__ are filled with arbitrary values. Only use this method if you don't care about any of them. |
Class | _ |
Base test class for HTTPParser which is responsible for the bulk of the task of parsing HTTP bytes. |
Variable | _boring |
Undocumented |
Assert that the given Deferred
fails with the exception given by mainType and that the exceptions wrapped by the instance of mainType it fails with match the list of exception types given by reasonTypes.
This is a helper for testing failures of exceptions which subclass _newclient._WrapperException
.
Parameters | |
self | A TestCase instance which will be used to make the assertions. |
deferred | The Deferred which is expected to fail with mainType. |
main | A _newclient._WrapperException subclass which will be trapped on deferred. |
reason | A sequence of exception types which will be trapped on the resulting mainType exception instance's reasons sequence. |
Returns | |
A Deferred which fires with the mainType instance deferred fails with, or which fails somehow. |
Helper function for creating a Response which uses the given transport. All of the other parameters to Response.__init__
are filled with arbitrary values. Only use this method if you don't care about any of them.