From 29db7b72161ee8423ce780e421a8913bb3073dfc Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Tue, 23 Jul 2013 15:13:00 +0900 Subject: [PATCH] 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. --- test_requests.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test_requests.py b/test_requests.py index f2b633b..3779e36 100755 --- a/test_requests.py +++ b/test_requests.py @@ -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): -- 2.7.4