diff options
author | Roberto Migli <robertomigli@gmail.com> | 2014-01-13 14:04:28 +0100 |
---|---|---|
committer | Roberto Migli <robertomigli@gmail.com> | 2014-01-13 14:04:28 +0100 |
commit | 49fb630eb4c8345702aaddc90d8edf73fd173a6e (patch) | |
tree | 67102aed99bf495170bb7188e212984d81e98b4c /test_requests.py | |
parent | a6a83420662b4ae2edda6949cf584415d3495c8e (diff) | |
parent | 5b4e9aff0ea2d0876de33f57cece4b06fe4bc194 (diff) | |
download | python-requests-49fb630eb4c8345702aaddc90d8edf73fd173a6e.tar.gz |
Merged changes from @lukasa
Diffstat (limited to 'test_requests.py')
-rwxr-xr-x | test_requests.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test_requests.py b/test_requests.py index 2f4c40a3..0a733104 100755 --- a/test_requests.py +++ b/test_requests.py @@ -194,7 +194,7 @@ class RequestsTestCase(unittest.TestCase): assert r.json()['cookies']['foo'] == 'bar' # Make sure the session cj is still the custom one assert s.cookies is cj - + def test_param_cookiejar_works(self): cj = cookielib.CookieJar() cookiejar_from_dict({'foo' : 'bar'}, cj) @@ -705,6 +705,10 @@ class RequestsTestCase(unittest.TestCase): url = 'http://user%25user:pass@complex.url.com/path?query=yes' assert ('user%user', 'pass') == requests.utils.get_auth_from_url(url) + def test_get_auth_from_url_encoded_hashes(self): + url = 'http://user:pass%23pass@complex.url.com/path?query=yes' + assert ('user', 'pass#pass') == requests.utils.get_auth_from_url(url) + def test_cannot_send_unprepared_requests(self): r = requests.Request(url=HTTPBIN) with pytest.raises(ValueError): |