Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Kenneth Reitz
2012-01-25 11:26:08 -05:00
2 changed files with 8 additions and 2 deletions
+2 -2
View File
@@ -351,8 +351,8 @@ class Request(object):
if not path:
path = '/'
# if is_py3:
path = quote(path.encode('utf-8'))
if is_py3:
path = quote(path.encode('utf-8'))
url.append(path)
+6
View File
@@ -72,6 +72,12 @@ class RequestsTestSuite(TestSetup, unittest.TestCase):
def test_invalid_url(self):
self.assertRaises(ValueError, get, 'hiwpefhipowhefopw')
def test_path_is_not_double_encoded(self):
request = requests.Request("http://0.0.0.0/get/~test")
assert request.path_url == "/get/%7Etest"
def test_HTTP_200_OK_GET(self):
r = get(httpbin('/get'))
self.assertEqual(r.status_code, 200)