'L{client.RedirectAgent} changes the method to I{GET} when getting
a redirect on a non-I{GET} request.
@param code: HTTP status code.
@param method: HTTP request method.'

def _testRedirectToGet(self, code, method):

    self.agent.request(method, 'http://example.com/foo')
    (req, res) = self.protocol.requests.pop()
    headers = http_headers.Headers({'location': ['http://example.com/bar']})
    response = Response(('HTTP', 1, 1), code, 'OK', headers, None)
    res.callback(response)
    (req2, res2) = self.protocol.requests.pop()
    self.assertEqual('GET', req2.method)
    self.assertEqual('/bar', req2.uri)
