'L{Response}s returned by L{Agent.request} have a reference to the
L{Request} that was originally issued.'

def test_responseIncludesRequest(self):

    uri = 'http://example.com/'
    agent = self.buildAgentForWrapperTest(self.reactor)
    d = agent.request('GET', uri)
    self.assertEqual(len(self.protocol.requests), 1)
    (req, res) = self.protocol.requests.pop()
    self.assertIsInstance(req, Request)
    resp = client.Response._construct(('HTTP', 1, 1), 200, 'OK', client.Headers({}), None, req)
    res.callback(resp)
    response = self.successResultOf(d)
    self.assertEqual((response.request.method, response.request.absoluteURI, response.request.headers), (req.method, req.absoluteURI, req.headers))
