Skip to content
Myr

Remove unused httpbin parameters

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

httpbin is used to mock HTTP endpoints. In these methods, the parameter goes unused.

authored by Steven M. Vascellaro · committed by Nate Prewitt · parent 5aeec8b · Browse files · 1 file+5 added−5 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+5 added−5 removed

  • tests:+5 added−5 removed

1 file+5 added−5 removed

modified:tests/test_requests.py+5 added-5 removed
1398 unmodified lines
1399 s2.mount('https://', HTTPAdapter())1400 assert 'http://' in s2.adapters1401 assert 'https://' in s2.adapters14021403 def test_session_get_adapter_prefix_matching(self, httpbin):1403 def test_session_get_adapter_prefix_matching(self):1404 prefix = 'https://example.com'1405 more_specific_prefix = prefix + '/some/path'14061407 url_matching_only_prefix = prefix + '/another/path'
9 unmodified lines
1417 assert s.get_adapter(url_matching_only_prefix) is prefix_adapter1418 assert s.get_adapter(url_matching_more_specific_prefix) is more_specific_prefix_adapter1419 assert s.get_adapter(url_not_matching_prefix) not in (prefix_adapter, more_specific_prefix_adapter)14201421 def test_session_get_adapter_prefix_matching_mixed_case(self, httpbin):1421 def test_session_get_adapter_prefix_matching_mixed_case(self):1422 mixed_case_prefix = 'hTtPs://eXamPle.CoM/MixEd_CAse_PREfix'1423 url_matching_prefix = mixed_case_prefix + '/full_url'14241425 s = requests.Session()
1 unmodified line
1427 s.mount(mixed_case_prefix, my_adapter)14281429 assert s.get_adapter(url_matching_prefix) is my_adapter14301431 def test_session_get_adapter_prefix_matching_is_case_insensitive(self, httpbin):1431 def test_session_get_adapter_prefix_matching_is_case_insensitive(self):1432 mixed_case_prefix = 'hTtPs://eXamPle.CoM/MixEd_CAse_PREfix'1433 url_matching_prefix_with_different_case = 'HtTpS://exaMPLe.cOm/MiXeD_caSE_preFIX/another_url'14341435 s = requests.Session()
358 unmodified lines
1794 session.close()1795 proxies['one'].clear.assert_called_once_with()1796 proxies['two'].clear.assert_called_once_with()17971798 def test_proxy_auth(self, httpbin):1798 def test_proxy_auth(self):1799 adapter = HTTPAdapter()1800 headers = adapter.proxy_headers("http://user:pass@httpbin.org")1801 assert headers == {'Proxy-Authorization': 'Basic dXNlcjpwYXNz'}18021803 def test_proxy_auth_empty_pass(self, httpbin):1803 def test_proxy_auth_empty_pass(self):1804 adapter = HTTPAdapter()1805 headers = adapter.proxy_headers("http://user:@httpbin.org")1806 assert headers == {'Proxy-Authorization': 'Basic dXNlcjo='}1807
663 unmodified lines