'If there is an error issuing the request to the remote publisher, an
error response is returned.'

def test_connectionLost(self):

    self.f1 = serverFactory = PBServerFactory(pb.Root())
    self.port1 = serverPort = reactor.listenTCP(0, serverFactory)
    self.sub = subscription = distrib.ResourceSubscription('127.0.0.1', serverPort.getHost().port)
    request = DummyRequest([''])
    d = _render(subscription, request)
    def cbRendered(ignored):
        self.assertEqual(request.responseCode, 500)
        errors = self.flushLoggedErrors(pb.NoSuchMethod)
        self.assertEqual(len(errors), 1)
        expected = ['', '<html>', '        <head><title>500    -    Server    Connection    Lost</title></head>', '        <body>', '                <h1>Server    Connection    Lost</h1>', '                <p>Connection    to    distributed    server    lost:<pre>[Failure    instance:    Traceback    from    remote    host    --    twisted.spread.flavors.NoSuchMethod:    No    such    method:    remote_request', ']</pre></p>', '        </body>', '</html>', '']
        self.assertEqual(['\n'.join(expected)], request.written)
    d.addCallback(cbRendered)
    return d
