From: David Pursehouse Date: Wed, 24 Jul 2013 08:18:16 +0000 (+0900) Subject: Rewrite `test_uppercase_scheme_redirect` to use local httpbin X-Git-Tag: 2.0~1^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=56b5f02551cd65cfc99f7f38c60d36b2cfdfc6e8;p=services%2Fpython-requests.git Rewrite `test_uppercase_scheme_redirect` to use local httpbin Instead of redirecting to hard-coded 'example.com', use the URL defined in `HTTPBIN_URL` with the path set to the 'html' endpoint. --- diff --git a/test_requests.py b/test_requests.py index 9bd720f..0dae1e2 100755 --- a/test_requests.py +++ b/test_requests.py @@ -554,7 +554,9 @@ class RequestsTestCase(unittest.TestCase): ) def test_uppercase_scheme_redirect(self): - r = requests.get(httpbin('redirect-to'), params={'url': 'HTTP://example.com/'}) + parts = urlparse(httpbin('html')) + url = "HTTP://" + parts.netloc + parts.path + r = requests.get(httpbin('redirect-to'), params={'url': url}) self.assertEqual(r.status_code, 200) def test_transport_adapter_ordering(self):