Skip to content
Myr

simplify httpbin stuff

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

authored by Kenneth Reitz · committed by Kenneth Reitz · parent ea1d5f3 · Browse files · 1 file+2 added−4 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+2 added−4 removed

  • tests:+2 added−4 removed

1 file+2 added−4 removed

modified:tests/test_requests.py+2 added-4 removed
19 unmodified lines
20from requests import HTTPError21from requests import get, post, head, put22from requests.auth import HTTPBasicAuth, HTTPDigestAuth2324if (sys.platform == 'win32') and ('HTTPBIN_URL' not in os.environ):24if 'HTTPBIN_URL' not in os.environ:25 os.environ['HTTPBIN_URL'] = 'http://httpbin.org/'2627# TODO: Detect an open port.28PORT = os.environ.get('HTTPBIN_PORT', '7077')29HTTPBIN_URL = os.environ.get('HTTPBIN_URL', 'http://0.0.0.0:%s/' % (PORT))27HTTPBIN_URL = os.environ.get('HTTPBIN_URL')282930def httpbin(*suffix):31 """Returns url for HTTPBIN resource."""
772 unmodified lines