Skip to content
Myr

Test cases fail when `HTTPBIN_URL` does not have trailing slash

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

Test cases can be run against a local httpbin server defined by the `HTTPBIN_URL` environment variable, but it causes tests to fail if the given URL does not end with a slash. Ensure that the URL always ends with a slash.

authored by David Pursehouse · committed by David Pursehouse · parent 66de6b5 · Browse files · 1 file+2 added−0 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−0 removed

  • other:+2 added−0 removed

1 file+2 added−0 removed

modified:test_requests.py+2 added
21 unmodified lines
22except ImportError:23 import io as StringIO2425HTTPBIN = os.environ.get('HTTPBIN_URL', 'http://httpbin.org/')26# Issue #1483: Make sure the URL always has a trailing slash27HTTPBIN = HTTPBIN.rstrip('/') + '/'282930def httpbin(*suffix):31 """Returns url for HTTPBIN resource."""
752 unmodified lines