mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Use urlparse.urljointo construct httpbin url
This commit is contained in:
+2
-1
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user