From: Roey Berman Date: Wed, 15 Aug 2012 11:36:51 +0000 (+0300) Subject: added b to stream write (for passing python3 tests X-Git-Tag: v2.4.0~26^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b399c011cd186e8f3da73711552bd904038278d1;p=thirdparty%2Ftornado.git added b to stream write (for passing python3 tests --- diff --git a/tornado/test/simple_httpclient_test.py b/tornado/test/simple_httpclient_test.py index fac7803f1..74059917d 100644 --- a/tornado/test/simple_httpclient_test.py +++ b/tornado/test/simple_httpclient_test.py @@ -324,10 +324,10 @@ class CreateAsyncHTTPClientTestCase(AsyncTestCase, LogTrapTestCase): class HTTP100ContinueTestCase(AsyncTestCase, LogTrapTestCase): def respond_100(self, request): self.request = request - self.request.connection.stream.write("HTTP/1.1 100 CONTINUE\r\n\r\n", self.respond_200) + self.request.connection.stream.write(b("HTTP/1.1 100 CONTINUE\r\n\r\n"), self.respond_200) def respond_200(self): - self.request.connection.stream.write("HTTP/1.1 200 OK\r\nContent-Length: 1\r\n\r\nA") + self.request.connection.stream.write(b("HTTP/1.1 200 OK\r\nContent-Length: 1\r\n\r\nA")) def test_100_continue(self): from tornado.httpserver import HTTPServer @@ -338,4 +338,4 @@ class HTTP100ContinueTestCase(AsyncTestCase, LogTrapTestCase): client = SimpleAsyncHTTPClient(io_loop = self.io_loop) client.fetch('http://localhost:%d/' % port, self.stop) res = self.wait() - self.assertEquals(res.body, 'A') + self.assertEqual(res.body, 'A')