Tests for twisted.web._newclient.

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

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.

ParametersselfA 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.
ReturnsA Deferred which fires with the mainType instance deferred fails with, or which fails somehow.
def assertResponseFailed(self, deferred, reasonTypes):

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

def assertRequestGenerationFailed(self, deferred, reasonTypes):

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

def assertRequestTransmissionFailed(self, deferred, reasonTypes):

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

def justTransportResponse(transport):

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.

API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.