'L{Response.response} references the previous L{Response} from
a redirect, or L{None} if there was no previous response.'

def test_responseHistory(self):

    agent = self.buildAgentForWrapperTest(self.reactor)
    redirectAgent = client.RedirectAgent(agent)
    deferred = redirectAgent.request('GET', 'http://example.com/foo')
    (redirectReq, redirectRes) = self.protocol.requests.pop()
    headers = http_headers.Headers({'location': ['http://example.com/bar']})
    redirectResponse = Response(('HTTP', 1, 1), 302, 'OK', headers, None)
    redirectRes.callback(redirectResponse)
    (req, res) = self.protocol.requests.pop()
    response = Response(('HTTP', 1, 1), 200, 'OK', headers, None)
    res.callback(response)
    finalResponse = self.successResultOf(deferred)
    self.assertIdentical(finalResponse.previousResponse, redirectResponse)
    self.assertIdentical(redirectResponse.previousResponse, None)
