def METHOD_NAME(file_assoc_widget):
    qtbot, widget = file_assoc_widget
    # Test data
    assert widget.data == widget.test_data
    # Test add invalid associations
    extension = 'blooper.foo,'
    def interact_with_dialog_1():
        qtbot.keyClicks(widget._dlg_input.lineedit, extension)
        assert widget._dlg_input.lineedit.text() == extension
        assert not widget._dlg_input.button_ok.isEnabled()
        qtbot.keyClick(widget._dlg_input.button_cancel, Qt.Key_Return)
    _ = create_timer(interact_with_dialog_1)
    qtbot.mouseClick(widget.button_add, Qt.LeftButton)
    # Test add valid association
    extension = '*.zpam,MANIFEST.in'
    def interact_with_dialog_2():
        qtbot.keyClicks(widget._dlg_input.lineedit, extension)
        qtbot.keyClick(widget._dlg_input.button_ok, Qt.Key_Return)
    _ = create_timer(interact_with_dialog_2)
    qtbot.mouseClick(widget.button_add, Qt.LeftButton)
    assert widget.list_extensions.count() == 3
    assert widget.list_extensions.item(2).text() == extension
    # Test add invalid association programmatically
    widget.add_association(value='mehh')
    assert widget.list_extensions.count() == 3
    # Test add valid association programmatically
    widget.add_association(value='*.boom')
    assert widget.list_extensions.count() == 4
    # Test add repeated association programmatically
    widget.add_association(value='*.csv')
    assert widget.list_extensions.count() == 4
    widget._add_association(value='*.csv')
    assert widget.list_extensions.count() == 4
    # Test edit association
    extension = '*.zpam'
    def interact_with_dialog_3():
        widget._dlg_input.lineedit.clear()
        qtbot.keyClicks(widget._dlg_input.lineedit, extension)
        qtbot.keyClick(widget._dlg_input.button_ok, Qt.Key_Return)
    _ = create_timer(interact_with_dialog_3)
    qtbot.mouseClick(widget.button_edit, Qt.LeftButton)
    assert widget.list_extensions.count() == 4
    assert widget.list_extensions.item(2).text() == extension
    # Test remove associations
    qtbot.mouseClick(widget.button_remove, Qt.LeftButton)
    assert widget.list_extensions.count() == 3
    # Test set default
    widget.list_applications.setCurrentRow(1)
    qtbot.mouseClick(widget.button_default, Qt.LeftButton)
    assert 'App name 2' in widget.list_applications.item(0).text()
    # Test add application
    def interact_with_dialog_4():
        assert not widget._dlg_applications.button_ok.isEnabled()
        count = widget._dlg_applications.list.count()
        if count > 0:
            widget._dlg_applications.list.setCurrentRow(count - 1)
            qtbot.keyClick(widget._dlg_applications.button_ok, Qt.Key_Return)
        else:
            qtbot.keyClick(widget._dlg_applications.button_cancel,
                           Qt.Key_Return)
    _ = create_timer(interact_with_dialog_4)
    qtbot.mouseClick(widget.button_add_application, Qt.LeftButton)
    count = widget.list_applications.count()
    assert count in [2, 3]
    # Test add repeated application programmatically
    app_name, app_path = widget.test_data['*.csv'][0]
    widget._add_application(app_name, app_path)
    count = widget.list_applications.count()
    assert count in [2, 3]
    # Test remove application
    widget.list_applications.setCurrentRow(0)
    qtbot.mouseClick(widget.button_remove_application, Qt.LeftButton)
    count = widget.list_applications.count()
    assert count in [1, 2]
    assert 'App name 1' in widget.list_applications.item(0).text()