def test_maximumLineLength(self):
        """
        C{LineReceiver} disconnects the transport if it receives a line longer
        than its C{MAX_LENGTH}.
        """
        proto = basic.LineReceiver()
        transport = proto_helpers.StringTransport()
        proto.makeConnection(transport)
        proto.dataReceived(b'x' * (proto.MAX_LENGTH + 1) + b'\r\nr')
        self.assertTrue(transport.disconnecting)

        C{LineReceiver} disconnects the transport if it receives a line longer
        than its C{MAX_LENGTH}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/protocols/test/test_basic.py