mirror of
https://github.com/kennethreitz/requests3.git
synced 2026-06-05 23:10:16 +00:00
Test cases fail when HTTPBIN_URL does not have trailing slash
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.
This commit is contained in:
@@ -23,6 +23,8 @@ except ImportError:
|
||||
import io as StringIO
|
||||
|
||||
HTTPBIN = os.environ.get('HTTPBIN_URL', 'http://httpbin.org/')
|
||||
# Issue #1483: Make sure the URL always has a trailing slash
|
||||
HTTPBIN = HTTPBIN.rstrip('/') + '/'
|
||||
|
||||
|
||||
def httpbin(*suffix):
|
||||
|
||||
Reference in New Issue
Block a user