Permalink
Browse files

added b to stream write (for passing python3 tests

  • Loading branch information...
1 parent 954777f commit b399c011cd186e8f3da73711552bd904038278d1 @bergundy bergundy committed Aug 15, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 tornado/test/simple_httpclient_test.py
@@ -324,10 +324,10 @@ def test_max_clients(self):
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 @@ def test_100_continue(self):
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')

0 comments on commit b399c01

Please sign in to comment.