def _requestTest(self, child, **kwargs):
    '\n        Set up a resource on a distrib site using L{ResourcePublisher} and\n        then retrieve it from a L{ResourceSubscription} via an HTTP client.\n\n        @param child: The resource to publish using distrib.\n        @param **kwargs: Extra keyword arguments to pass to L{Agent.request} when\n            requesting the resource.\n\n        @return: A L{Deferred} which fires with the result of the request.\n        '
    (mainPort, mainAddr) = self._setupDistribServer(child)
    agent = client.Agent(reactor)
    url = ('http://%s:%s/child' % (mainAddr.host, mainAddr.port))
    url = url.encode('ascii')
    d = agent.request(b'GET', url, **kwargs)
    d.addCallback(client.readBody)
    return d
Set up a resource on a distrib site using L{ResourcePublisher} and
then retrieve it from a L{ResourceSubscription} via an HTTP client.

@param child: The resource to publish using distrib.
@param **kwargs: Extra keyword arguments to pass to L{Agent.request} when
    requesting the resource.

@return: A L{Deferred} which fires with the result of the request.
def _requestTest(self, child, **kwargs):
    '\n        Set up a resource on a distrib site using L{ResourcePublisher} and\n        then retrieve it from a L{ResourceSubscription} via an HTTP client.\n\n        @param child: The resource to publish using distrib.\n        @param **kwargs: Extra keyword arguments to pass to L{Agent.request} when\n            requesting the resource.\n\n        @return: A L{Deferred} which fires with the result of the request.\n        '
    (mainPort, mainAddr) = self._setupDistribServer(child)
    agent = client.Agent(reactor)
    url = ('http://%s:%s/child' % (mainAddr.host, mainAddr.port))
    url = url.encode('ascii')
    d = agent.request(b'GET', url, **kwargs)
    d.addCallback(client.readBody)
    return d