class documentation

class HTTPRequestWrappingIRequestTests(TestCase): (source)

View In Hierarchy

Method legacyRequest Undocumented
Method test_bodyAsBytes HTTPRequestWrappingIRequest.bodyAsBytes matches the underlying legacy request body.
Async Method test_bodyAsBytesCached HTTPRequestWrappingIRequest.bodyAsBytes called twice returns the same object both times.
Method test_bodyAsFountTwice HTTPRequestWrappingIRequest.bodyAsFount raises FountAlreadyAccessedError if called more than once.
Method test_headers HTTPRequestWrappingIRequest.headers returns an HTTPRequestWrappingIRequest containing the underlying legacy request headers.
Method test_interface HTTPRequestWrappingIRequest implements IHTTPRequest.
Method test_method HTTPRequestWrappingIRequest.method matches the underlying legacy request method.
Method test_uri HTTPRequestWrappingIRequest.uri matches the underlying legacy request URI.

Inherited from TestCase:

Method assertProvides Assert that a object provides an interface.
def legacyRequest(self, path=b'/', method=b'GET', host=b'localhost', port=8080, isSecure=False, body=b'', headers=emptyMapping): (source)

Undocumented

Parameters
path:bytesUndocumented
method:bytesUndocumented
host:bytesUndocumented
port:intUndocumented
isSecure:boolUndocumented
body:bytesUndocumented
headers:Mapping[bytes, Sequence[bytes]]Undocumented
Returns
IRequestUndocumented
@given(binary())
def test_bodyAsBytes(self, data): (source)

HTTPRequestWrappingIRequest.bodyAsBytes matches the underlying legacy request body.

Parameters
data:bytesUndocumented
@ensuringDeferred
async def test_bodyAsBytesCached(self): (source)

HTTPRequestWrappingIRequest.bodyAsBytes called twice returns the same object both times.

def test_bodyAsFountTwice(self): (source)
def test_headers(self): (source)

HTTPRequestWrappingIRequest.headers returns an HTTPRequestWrappingIRequest containing the underlying legacy request headers.

def test_interface(self): (source)
@given(text(alphabet=ascii_uppercase, min_size=1))
def test_method(self, methodText): (source)

HTTPRequestWrappingIRequest.method matches the underlying legacy request method.

Parameters
methodText:strUndocumented
@given(decoded_urls())
def test_uri(self, url): (source)

HTTPRequestWrappingIRequest.uri matches the underlying legacy request URI.

Parameters
url:DecodedURLUndocumented