def test_unknownContentLength(self):
        finished = []
        protocol = HTTPClientParser(
            Request(b'GET', b'/', _boringHeaders, None), finished.append)
        transport = StringTransport()
        protocol.makeConnection(transport)
        protocol.dataReceived(b'HTTP/1.1 200 OK\r\n')

        body = []
        protocol.response._bodyDataReceived = body.append

        protocol.dataReceived(b'\r\n')
        protocol.dataReceived(b'foo')
        protocol.dataReceived(b'bar')
        self.assertEqual(body, [b'foo', b'bar'])
        protocol.connectionLost(ConnectionDone(u"simulated end of connection"))
        self.assertEqual(finished, [b''])
Reads value from the stream.
dataset/ETHPy150Open twisted/twisted/twisted/web/test/test_newclient.py/HTTPClientParserTests.test_unknownContentLength--crossover with--dataset/ETHPy150Open denisenkom/pytds/pytds/tds_types.py/BaseType.read