def METHOD_NAME(qtbot, init_value, new_value):
    """
    Test setting the flag to disable the widget when there's a channel disconnection.
    Expectations:
    The widget retains the new Boolean setting.
    Parameters
    ----------
    qtbot : fixture
        pytest-qt window for widget test
    init_value : bool
        The initial flag to whether disable a widget at disconnection. True is to disable the widget in that event;
        False is not to disable.
    new_value
        The flag to change the widget disabling setting. True is to disable the widget in that event;
        False is not to disable.
    """
    pydm_frame = PyDMFrame()
    qtbot.addWidget(pydm_frame)
    pydm_frame._disable_on_disconnect = init_value
    pydm_frame.disableOnDisconnect = new_value
    assert pydm_frame.disableOnDisconnect == new_value