'If one of the L{Response} methods called by
L{HTTPClientParser.connectionLost} raises an exception, the exception
is logged and not re-raised.'

def test_connectionLostWithError(self):

    transport = StringTransport()
    protocol = HTTPClientParser(Request('GET', '/', _boringHeaders, None), None)
    protocol.makeConnection(transport)
    response = []
    protocol._responseDeferred.addCallback(response.append)
    protocol.dataReceived('HTTP/1.1    200    OK\r\nContent-Length:    1\r\n\r\n')
    response = response[0]
    def fakeBodyDataFinished(err=None):
        raise ArbitraryException()
    response._bodyDataFinished = fakeBodyDataFinished
    protocol.connectionLost(None)
    self.assertEqual(len(self.flushLoggedErrors(ArbitraryException)), 1)
