'Find the child of C{self.resource} for the given request and
render it to generate a response.'

def request(self, method, url, headers=None, body=None):

    if (headers is None):
        headers = Headers()
    content = BytesIO()
    if (body is None):
        reading = defer.succeed(None)
    else:
        reading = body.startProducing(content)
    def finishedReading(ignored):
        request = dummyRequest(method, url, headers, content.getvalue())
        resource = getChildForRequest(self.resource, request)
        d = render(resource, request)
        d.addCallback((lambda ignored: request))
        return d
    rendering = reading.addCallback(finishedReading)
    def rendered(request):
        return _MemoryResponse(('HTTP', 1, 1), request._code, request._message, request.responseHeaders, request, None, request._responseBody)
    rendering.addCallback(rendered)
    return reading
