def asResponse(request):
    return _MemoryResponse(
        b"HTTP/1.1", request.code, request.code_message,
        request.responseHeaders, None, None,
        request._responseBody)
Extract the response data stored on a request and create a real response
dataset/ETHPy150Open ClusterHQ/flocker/flocker/restapi/testtools.py/asResponse