def METHOD_NAME(buffer_connection):
    from moler.cmd.unix import run_serial_proxy
    from moler.exceptions import ParsingDone
    run = run_serial_proxy.RunSerialProxy(connection=buffer_connection.moler_connection,
                                          serial_devname="COM5")
    with pytest.raises(ParsingDone):
        with mock.patch.object(buffer_connection.moler_connection, "send") as connection_send:
            run._exit_from_python_shell(line=">>> ")
    connection_send.assert_called_once_with("exit()\n")