

@gen_test
def test_http10_no_content_length(self):
    conn = HTTP1Connection(self.client_stream, True)
    self.server_stream.write(b'HTTP/1.0 200 Not Modified\r\n\r\nhello')
    self.server_stream.close()
    event = Event()
    test = event
    body = []

    class Delegate(HTTPMessageDelegate):

        def headers_received(self, start_line, headers):
            test.code = start_line.code

        def data_received(self, data):
            body.append(data)

        def finish(self):
            event.set()
    (yield conn.read_response(Delegate()))
    (yield event.wait())
    self.assertEqual(self.code, 200)
    self.assertEqual(b''.join(body), b'hello')

dataset/ETHPy150Open tornadoweb/tornado/tornado/test/http1connection_test.py HTTP1ConnectionTest.test_http10_no_content_length/VarMisuse@49/85 `self`->`event`