'L{http.Request.connectionLost} closes L{Request.content} and drops the
reference to the L{HTTPChannel} to assist with garbage collection.'

def test_connectionLost(self):

    req = http.Request(DummyChannel(), False)
    req.gotLength(10)
    content = req.content
    req.handleContentChunk('hello')
    req.connectionLost(Failure(ConnectionLost('Finished')))
    self.assertTrue(content.closed)
    self.assertIdentical(req.channel, None)
