From: Omri Bahumi Date: Thu, 28 Feb 2013 18:18:22 +0000 (+0200) Subject: Python3 compatibility for test_streaming_callback_with_data_in_buffer X-Git-Tag: v3.0.0~83^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F686%2Fhead;p=thirdparty%2Ftornado.git Python3 compatibility for test_streaming_callback_with_data_in_buffer --- diff --git a/tornado/test/iostream_test.py b/tornado/test/iostream_test.py index bb4796d6f..c2e9cab94 100644 --- a/tornado/test/iostream_test.py +++ b/tornado/test/iostream_test.py @@ -147,17 +147,17 @@ class TestIOStreamMixin(object): def test_streaming_callback_with_data_in_buffer(self): server, client = self.make_iostream_pair() - client.write("abcd\r\nefgh") - server.read_until("\r\n", self.stop) + client.write(b"abcd\r\nefgh") + server.read_until(b"\r\n", self.stop) data = self.wait() - self.assertEqual(data, "abcd\r\n") + self.assertEqual(data, b"abcd\r\n") def closed_callback(chunk): self.fail() server.read_until_close(callback=closed_callback, streaming_callback=self.stop) self.io_loop.add_timeout(self.io_loop.time() + 0.01, self.stop) data = self.wait() - self.assertEqual(data, "efgh") + self.assertEqual(data, b"efgh") server.close() client.close()