Skip to content
Myr

Rewrite `test_uppercase_scheme_redirect` to use local httpbin

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Instead of redirecting to hard-coded 'example.com', use the URL defined in `HTTPBIN_URL` with the path set to the 'html' endpoint.

authored by David Pursehouse · committed by David Pursehouse · parent c4f16c3 · Browse files · 1 file+3 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−1 removed

  • other:+3 added−1 removed

1 file+3 added−1 removed

modified:test_requests.py+3 added-1 removed
552 unmodified lines
553 'application/json'554 )555556 def test_uppercase_scheme_redirect(self):557 parts = urlparse(httpbin('html'))558 url = "HTTP://" + parts.netloc + parts.path557 r = requests.get(httpbin('redirect-to'), params={'url': 'HTTP://example.com/'})559 r = requests.get(httpbin('redirect-to'), params={'url': url})560 self.assertEqual(r.status_code, 200)561562 def test_transport_adapter_ordering(self):563 s = requests.Session()
206 unmodified lines