From d2176cf0526ee1965f830f0a6681dbcc9007d52e Mon Sep 17 00:00:00 2001 From: Ian Cordasco Date: Tue, 23 Jul 2013 10:23:31 -0500 Subject: [PATCH] Use urlparse.urljointo construct httpbin url --- test_requests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test_requests.py b/test_requests.py index 9b9ff4a..6b676f0 100755 --- a/test_requests.py +++ b/test_requests.py @@ -8,6 +8,7 @@ import json import os import unittest import pickle +import urlparse import requests from requests.auth import HTTPDigestAuth @@ -29,7 +30,7 @@ HTTPBIN = HTTPBIN.rstrip('/') + '/' def httpbin(*suffix): """Returns url for HTTPBIN resource.""" - return HTTPBIN + '/'.join(suffix) + return urlparse.urljoin(HTTPBIN, '/'.join(suffix)) class RequestsTestCase(unittest.TestCase): -- 2.34.1