def test_follow(self):
    self.mock_response.status = 303
    self.headers.append(('location', 'http://localhost:8080/error/401'))
    assert (303 == self.client.get('auth/token'))
    self.client.follow()
    (method, path, body, headers) = self.mock_c.request.call_args[0]
    assert ('GET' == method)
    assert ('/error/401' == path)
def test_follow(self):
    self.mock_response.status = 303
    self.headers.append(('location', 'http://localhost:8080/error/401'))
    assert (303 == self.client.get('auth/token'))
    self.client.follow()
    (method, path, body, headers) = self.mock_c.request.call_args[0]
    assert ('GET' == method)
    assert ('/error/401' == path)