module documentation
Class HTTP11ClientProtocolTests Tests for the HTTP 1.1 client protocol implementation, HTTP11ClientProtocol.
Class HTTPClientParserTests Tests for HTTPClientParser which is responsible for parsing HTTP response messages.
Class HTTPParserNonRFCComplaintDelimeterTests _HTTPParserTests using bare LF newlines.
Class HTTPParserRFCComplaintDelimeterTests _HTTPParserTests using standard CR LF newlines.
Class LengthEnforcingConsumerTests Tests for LengthEnforcingConsumer.
Class MakeStatefulDispatcherTests Tests for makeStatefulDispatcher.
Class RequestBodyConsumerTests Tests for ChunkedEncoder which sits between an ITransport and a request/response body producer and chunked encodes everything written to it.
Class RequestTests Tests for Request.
Class ResponseTests Tests for Response.
Class SimpleRequest 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 SlowRequest is a fake implementation of Request which is easily controlled externally (for example, by code in a test method).
Class StringProducer StringProducer is a dummy body producer.
Class TransportProxyProducerTests Tests for TransportProxyProducer which proxies the IPushProducer interface of a transport.
Exception AnotherArbitraryException Similar to ArbitraryException but with a different identity.
Exception ArbitraryException A unique, arbitrary exception type which twisted.web._newclient knows nothing about.
Function assertRequestGenerationFailed A simple helper to invoke assertWrapperExceptionTypes with a mainType of RequestGenerationFailed.
Function assertRequestTransmissionFailed A simple helper to invoke assertWrapperExceptionTypes with a mainType of RequestTransmissionFailed.
Function assertResponseFailed A simple helper to invoke assertWrapperExceptionTypes with a mainType of ResponseFailed.
Function assertWrapperExceptionTypes 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 justTransportResponse 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 _HTTPParserTests Base test class for HTTPParser which is responsible for the bulk of the task of parsing HTTP bytes.
Variable _boringHeaders Undocumented
def assertRequestGenerationFailed(self, deferred, reasonTypes): (source)

A simple helper to invoke assertWrapperExceptionTypes with a mainType of RequestGenerationFailed.

def assertRequestTransmissionFailed(self, deferred, reasonTypes): (source)

A simple helper to invoke assertWrapperExceptionTypes with a mainType of RequestTransmissionFailed.

def assertResponseFailed(self, deferred, reasonTypes): (source)

A simple helper to invoke assertWrapperExceptionTypes with a mainType of ResponseFailed.

def assertWrapperExceptionTypes(self, deferred, mainType, reasonTypes): (source)

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
selfA TestCase instance which will be used to make the assertions.
deferredThe Deferred which is expected to fail with mainType.
mainTypeA _newclient._WrapperException subclass which will be trapped on deferred.
reasonTypesA 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.
def justTransportResponse(transport): (source)

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.

_boringHeaders = (source)

Undocumented