def cursorAtSpaceEnd(block):
            cursor = QTextCursor(block)
            cursor.setPosition(block.position() + len(blockIndentation(block)))
            return cursor
def stop(self):
        self._patcher.stop()
        self._patcher2.stop()
        self._server_mock = None