'Fixture to mock QApplication.clipboard.
Return:
The mocked QClipboard object.'

@pytest.fixture
def mock_clipboard(self, mocker):

    mocker.patch.object(QApplication, 'clipboard')
    clipboard = mock.MagicMock()
    clipboard.supportsSelection.return_value = True
    QApplication.clipboard.return_value = clipboard
    return clipboard
