def METHOD_NAME(self, plotter, mocker):
    ''' test the workspace print '''
    mocker.patch.object(QtGui.QPainter, 'end')
    mocker.patch.object(QtWidgets.QLabel, 'render')
    # First, let's cancel printing
    mocker.patch.object(QtPrintSupport.QPrintDialog, 'exec_', return_value=QtWidgets.QDialog.Rejected)
    plotter.onImagePrint()
    assert not QtGui.QPainter.end.called
    assert not QtWidgets.QLabel.render.called
    # Let's print now
    mocker.patch.object(QtPrintSupport.QPrintDialog, 'exec_', return_value=QtWidgets.QDialog.Accepted)
    plotter.onImagePrint()
    assert QtGui.QPainter.end.called
    assert QtWidgets.QLabel.render.called