module documentation

Test HTTP/2 support.

Class AbortingConsumerDummyHandler This is a HTTP request handler that works with the IPushProducer implementation in the H2Stream object. The difference between this and the ConsumerDummyHandler is that after resuming production it immediately aborts it again.
Class ChunkedHTTPHandler A HTTP request object that writes chunks of data back to the network based on the URL.
Class ConsumerDummyHandler This is a HTTP request handler that works with the IPushProducer implementation in the H2Stream object. No current IRequest object does that, but in principle future implementations could: that codepath should therefore be tested.
Class DummyProducerHandler An HTTP request handler that registers a dummy producer to serve the body.
Class FrameBuffer A test object that converts data received from Twisted's HTTP/2 stack and turns it into a sequence of hyperframe frame objects.
Class FrameFactory A class containing lots of helper methods and state to build frames. This allows test cases to easily build correct HTTP/2 frames to feed to hyper-h2.
Class H2FlowControlTests Tests that ensure that we handle HTTP/2 flow control limits appropriately.
Class HTTP2SchedulingTests The H2Connection object schedules certain events (mostly its data sending loop) using callbacks from the reactor. These tests validate that the calls are scheduled correctly.
Class HTTP2ServerTests No class docstring; 0/7 class variable, 33/33 methods documented
Class HTTP2TestHelpers A superclass that contains no tests but provides test helpers for HTTP/2 tests.
Class HTTP2TimeoutTests The H2Connection object times out idle connections.
Class HTTP2TransportChecking No class docstring; 0/1 class variable, 4/4 methods documented
Class NotifyingRequestFactory A http.Request factory that calls http.Request.notifyFinish on all http.Request objects before it returns them, and squirrels the resulting defer.Deferred away on the class for later use. This is done as early as possible to ensure that we always see the result.
Function buildRequestBytes Provides the byte sequence for a collection of HTTP/2 frames representing the provided request.
Function buildRequestFrames Provides a sequence of HTTP/2 frames that encode a single HTTP request. This should be used when you want to control the serialization yourself, e.g. because you want to interleave other frames with these...
Function framesFromBytes Given a sequence of bytes, decodes them into frames.
Variable AbortingConsumerDummyHandlerProxy Undocumented
Variable ChunkedHTTPHandlerProxy Undocumented
Variable ConsumerDummyHandlerProxy Undocumented
Variable DummyProducerHandlerProxy Undocumented
Variable NotifyingRequestFactoryProxy Undocumented
Variable skipH2 Undocumented
def buildRequestBytes(headers, data, frameFactory=None, streamID=1): (source)

Provides the byte sequence for a collection of HTTP/2 frames representing the provided request.

Parameters
headers:list of tuple of bytesThe HTTP/2 headers to send.
data:list of bytesThe HTTP data to send. Each list entry will be sent in its own frame.
frameFactory:FrameFactoryThe FrameFactory that will be used to construct the frames.
streamID:intThe ID of the stream on which to send the request.
def buildRequestFrames(headers, data, frameFactory=None, streamID=1): (source)

Provides a sequence of HTTP/2 frames that encode a single HTTP request. This should be used when you want to control the serialization yourself, e.g. because you want to interleave other frames with these. If that's not necessary, prefer buildRequestBytes.

Parameters
headers:list of tuple of bytesThe HTTP/2 headers to send.
data:list of bytesThe HTTP data to send. Each list entry will be sent in its own frame.
frameFactory:FrameFactoryThe FrameFactory that will be used to construct the frames.
streamID:intThe ID of the stream on which to send the request.
def framesFromBytes(data): (source)

Given a sequence of bytes, decodes them into frames.

Note that this method should almost always be called only once, before making some assertions. This is because decoding HTTP/2 frames is extremely stateful, and this function doesn't preserve any of that state between calls.

Parameters
data:bytesThe serialized HTTP/2 frames.
Returns
list of hyperframe.frame.Frame subclasses.A list of HTTP/2 frames.
AbortingConsumerDummyHandlerProxy = (source)

Undocumented

ChunkedHTTPHandlerProxy = (source)

Undocumented

ConsumerDummyHandlerProxy = (source)

Undocumented

DummyProducerHandlerProxy = (source)

Undocumented

NotifyingRequestFactoryProxy = (source)

Undocumented

Undocumented