diff options
author | Kenneth Reitz <me@kennethreitz.org> | 2014-10-02 12:20:05 -0400 |
---|---|---|
committer | Kenneth Reitz <me@kennethreitz.org> | 2014-10-02 12:20:05 -0400 |
commit | e74791d0543aa3bb65bcdfa40c3d8946cd84a0d6 (patch) | |
tree | 100e3d329ddf420b1b823a410867b16d9bf3719f /test_requests.py | |
parent | a718a81d273503bd2ffae8e6cb036a8516eb426a (diff) | |
parent | a68d1b4517395e4845fa8405f043f8aa3110f83c (diff) | |
download | python-requests-e74791d0543aa3bb65bcdfa40c3d8946cd84a0d6.tar.gz |
Merge pull request #2238 from buttscicles/byte-urls
Support bytestring URLs on Python 3.x
Diffstat (limited to 'test_requests.py')
-rwxr-xr-x | test_requests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test_requests.py b/test_requests.py index 4fccc346..ae879cd1 100755 --- a/test_requests.py +++ b/test_requests.py @@ -591,6 +591,12 @@ class RequestsTestCase(unittest.TestCase): assert resp.json()['headers'][ 'Dummy-Auth-Test'] == 'dummy-auth-test-ok' + def test_prepare_request_with_bytestring_url(self): + req = requests.Request('GET', b'https://httpbin.org/') + s = requests.Session() + prep = s.prepare_request(req) + assert prep.url == "https://httpbin.org/" + def test_links(self): r = requests.Response() r.headers = { |