[Python-3000-checkins] r57637 - python/branches/py3k/Lib/test/test_httplib.py

guido.van.rossum python-3000-checkins at python.org
Wed Aug 29 04:00:20 CEST 2007


Author: guido.van.rossum
Date: Wed Aug 29 04:00:20 2007
New Revision: 57637

Modified:
   python/branches/py3k/Lib/test/test_httplib.py
Log:
Make test_httplib pass.


Modified: python/branches/py3k/Lib/test/test_httplib.py
==============================================================================
--- python/branches/py3k/Lib/test/test_httplib.py	(original)
+++ python/branches/py3k/Lib/test/test_httplib.py	Wed Aug 29 04:00:20 2007
@@ -53,7 +53,7 @@
             def __init__(self):
                 self.count = {}
             def append(self, item):
-                kv = item.split(':')
+                kv = item.split(b':')
                 if len(kv) > 1:
                     # item is a 'Key: Value' header string
                     lcKey = kv[0].decode('ascii').lower()
@@ -138,8 +138,8 @@
         resp.close()
 
     def test_send_file(self):
-        expected = ('GET /foo HTTP/1.1\r\nHost: example.com\r\n'
-                   'Accept-Encoding: identity\r\nContent-Length:')
+        expected = (b'GET /foo HTTP/1.1\r\nHost: example.com\r\n'
+                    b'Accept-Encoding: identity\r\nContent-Length:')
 
         body = open(__file__, 'rb')
         conn = httplib.HTTPConnection('example.com')


More information about the Python-3000-checkins mailing list