mirror of
https://github.com/python/cpython.git
synced 2025-11-03 19:34:08 +00:00
SF patch# 1762940 by Joe Gregorio.
Fix test_cookielib and test_urllib2. (The changes to urllib make urllib.quote() work correctly for Unicode strings; but they don't fix test_urllib.)
This commit is contained in:
parent
15863ea07a
commit
c0f2d2d345
4 changed files with 24 additions and 14 deletions
|
|
@ -1003,7 +1003,7 @@ class HandlerTests(unittest.TestCase):
|
|||
self.assertEqual(len(http_handler.requests), 2)
|
||||
self.assertFalse(http_handler.requests[0].has_header(auth_header))
|
||||
userpass = '%s:%s' % (user, password)
|
||||
auth_hdr_value = 'Basic '+base64.encodestring(userpass).strip()
|
||||
auth_hdr_value = 'Basic ' + str(base64.encodestring(userpass)).strip()
|
||||
self.assertEqual(http_handler.requests[1].get_header(auth_header),
|
||||
auth_hdr_value)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue