def METHOD_NAME(self, widget, mocker):
    '''Test file save'''
    mocker.patch.object(widget, 'writeBatchToFile')
    # user cancels dialog
    mocker.patch.object(QtWidgets.QFileDialog, 'getSaveFileName', return_value=("","BOOP"))
    # write not called
    widget.actionSaveFile()
    widget.writeBatchToFile.assert_not_called()
    # user chooses proper name
    mocker.patch.object(QtWidgets.QFileDialog, 'getSaveFileName', return_value=("plop","BOOP"))
    # write called
    widget.actionSaveFile()
    widget.writeBatchToFile.assert_called_once()