class GetValuesTestsMixIn(ABC): (source)
Known subclasses: klein.test.test_headers.FrozenHTTPHeadersTests
, klein.test.test_headers.MutableHTTPHeadersTestsMixIn
, klein.test.test_headers.RawHeadersReadTests
Tests for utilities that access data from the RawHeaders internal representation.
Method | get |
Look up the values for the given header name from the given raw headers. |
Method | header |
Test hook for the normalization of header text values, which is a behavior Twisted has changed after version 18.9.0. |
Method | test_get |
getValues returns an iterable of bytes values for the given bytes header name. |
Method | test_get |
getValues raises TypeError when the given header name is of an unknown type. |
Method | test_get |
getValues returns an iterable of str values for the given str header name. |
Method | test_get |
getValues returns an iterable of str values for the given str header name. |
klein.test.test_headers.FrozenHTTPHeadersTests
, klein.test.test_headers.MutableHTTPHeadersTestsMixIn
, klein.test.test_headers.RawHeadersReadTests
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 | |
rawRawHeaders | Undocumented |
name:AnyStr | Undocumented |
Returns | |
Iterable[ | Undocumented |
def test_getTextName(self, textPairs): (source)
def test_getTextNameBinaryValues(self, pairs): (source)
getValues returns an iterable of str
values for the given str
header name.
This test only inserts binary data into the header values, which includes invalid data if you are a sane person, but arguably technically valid if you read the spec because the spec is unclear about header encodings, so we made sure that works also, if only sort of.
Parameters | |
pairs:Iterable[ | Undocumented |