]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Make test_httplib pass.
authorGuido van Rossum <guido@python.org>
Wed, 29 Aug 2007 02:00:20 +0000 (02:00 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 29 Aug 2007 02:00:20 +0000 (02:00 +0000)
Lib/test/test_httplib.py

index 2d61c4646d27ee7f73e4a48768d918ce4d140608..d9b3b8240795646e4fb11420800c817085be75fa 100644 (file)
@@ -53,7 +53,7 @@ class HeaderTests(TestCase):
             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 @@ class BasicTest(TestCase):
         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')