projects
/
services
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66de6b5
)
Test cases fail when `HTTPBIN_URL` does not have trailing slash
author
David Pursehouse
<david.pursehouse@gmail.com>
Tue, 23 Jul 2013 06:13:00 +0000
(15:13 +0900)
committer
David Pursehouse
<david.pursehouse@gmail.com>
Tue, 23 Jul 2013 06:29:36 +0000
(15:29 +0900)
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
patch
|
blob
|
history
diff --git
a/test_requests.py
b/test_requests.py
index f2b633b5f04b61e4626bad66d3949bf66f6e323d..3779e36544394d64a18e961a117359a2c4da086f 100755
(executable)
--- 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):