class documentation

class FrozenHTTPHeadersTests(GetValuesTestsMixIn, TestCase): (source)

View In Hierarchy

Tests for FrozenHTTPHeaders.

Method getValues Look up the values for the given header name from the given raw headers.
Method test_defaultHeaders FrozenHTTPHeaders.rawHeaders is empty by default.
Method test_interface FrozenHTTPHeaders implements IHTTPHeaders.

Inherited from GetValuesTestsMixIn:

Method headerNormalize Test hook for the normalization of header text values, which is a behavior Twisted has changed after version 18.9.0.
Method test_getBytesName getValues returns an iterable of bytes values for the given bytes header name.
Method test_getInvalidNameType getValues raises TypeError when the given header name is of an unknown type.
Method test_getTextName getValues returns an iterable of str values for the given str header name.
Method test_getTextNameBinaryValues getValues returns an iterable of str values for the given str header name.

Inherited from TestCase:

Method assertProvides Assert that a object provides an interface.
def getValues(self, rawHeaders, name): (source)

Look up the values for the given header name from the given raw headers.

This is called by the other tests in this mix-in class to allow test cases that use it to specify how to perform this look-up in the implementation being tested.

Parameters
rawHeaders:RawHeadersUndocumented
name:AnyStrUndocumented
Returns
Iterable[AnyStr]Undocumented
def test_defaultHeaders(self): (source)

FrozenHTTPHeaders.rawHeaders is empty by default.

def test_interface(self): (source)