Use urlparse.urljointo construct httpbin url

This commit is contained in:
Ian Cordasco
2013-07-23 10:23:31 -05:00
parent f71bff1226
commit d2176cf052
+2 -1
View File
@@ -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):