summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllib2.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-08-03 19:19:24 (GMT)
committerGuido van Rossum <guido@python.org>2007-08-03 19:19:24 (GMT)
commitc0f2d2d345d5fe97f81554d49b273b3feb0e37ae (patch)
treef1e57383a03f8723af8ad68dc831732ad9000dbb /Lib/test/test_urllib2.py
parent15863ea07ab4eed2d91ce55b274245e8d420723d (diff)
downloadcpython-c0f2d2d345d5fe97f81554d49b273b3feb0e37ae.zip
cpython-c0f2d2d345d5fe97f81554d49b273b3feb0e37ae.tar.gz
cpython-c0f2d2d345d5fe97f81554d49b273b3feb0e37ae.tar.bz2
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.)
Diffstat (limited to 'Lib/test/test_urllib2.py')
-rw-r--r--Lib/test/test_urllib2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py
index 488e9e2..e3e6de2 100644
--- a/Lib/test/test_urllib2.py
+++ b/Lib/test/test_urllib2.py
@@ -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)