Mercurial > hg
diff mercurial/httpclient/tests/test_ssl.py @ 14376:a75e0f4ba0ab
httpclient: import revision fc731618702a of py-nonblocking-http
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Tue, 17 May 2011 10:28:03 -0500 |
parents | 5c3de67e7402 |
children | 24dbef11f477 |
line wrap: on
line diff
--- a/mercurial/httpclient/tests/test_ssl.py Mon May 16 16:59:45 2011 -0500 +++ b/mercurial/httpclient/tests/test_ssl.py Tue May 17 10:28:03 2011 -0500 @@ -41,15 +41,15 @@ con._connect() # extend the list instead of assign because of how # MockSSLSocket works. - con.sock.data.extend(['HTTP/1.1 200 OK\r\n', - 'Server: BogusServer 1.0\r\n', - 'MultiHeader: Value\r\n' - 'MultiHeader: Other Value\r\n' - 'MultiHeader: One More!\r\n' - 'Content-Length: 10\r\n', - '\r\n' - '1234567890' - ]) + con.sock.data = ['HTTP/1.1 200 OK\r\n', + 'Server: BogusServer 1.0\r\n', + 'MultiHeader: Value\r\n' + 'MultiHeader: Other Value\r\n' + 'MultiHeader: One More!\r\n' + 'Content-Length: 10\r\n', + '\r\n' + '1234567890' + ] con.request('GET', '/') expected_req = ('GET / HTTP/1.1\r\n' @@ -68,17 +68,15 @@ def testSslRereadInEarlyResponse(self): con = http.HTTPConnection('1.2.3.4:443') con._connect() - # extend the list instead of assign because of how - # MockSSLSocket works. - con.sock.early_data.extend(['HTTP/1.1 200 OK\r\n', - 'Server: BogusServer 1.0\r\n', - 'MultiHeader: Value\r\n' - 'MultiHeader: Other Value\r\n' - 'MultiHeader: One More!\r\n' - 'Content-Length: 10\r\n', - '\r\n' - '1234567890' - ]) + con.sock.early_data = ['HTTP/1.1 200 OK\r\n', + 'Server: BogusServer 1.0\r\n', + 'MultiHeader: Value\r\n' + 'MultiHeader: Other Value\r\n' + 'MultiHeader: One More!\r\n' + 'Content-Length: 10\r\n', + '\r\n' + '1234567890' + ] expected_req = self.doPost(con, False) self.assertEqual(None, con.sock, @@ -92,3 +90,4 @@ resp.headers.getheaders('multiheader')) self.assertEqual(['BogusServer 1.0'], resp.headers.getheaders('server')) +# no-check-code