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:
David Pursehouse
2013-07-23 15:13:00 +09:00
parent 66de6b528d
commit 29db7b7216
+2
View File
@@ -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):