mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
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.
This commit is contained in:
+3
-1
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user