def test_screensaver_error(self):
        mock = MagicMock(return_value={'retcode': 1})
        with patch.dict(mac_desktop.__salt__, {'cmd.run_all': mock}):
            self.assertRaises(CommandExecutionError,
                              mac_desktop.screensaver)

    # 'lock' function tests: 2
Update status of a predecessor for finished successor job.
dataset/ETHPy150Open saltstack/salt/tests/unit/modules/mac_desktop_test.py/MacDesktopTestCase.test_screensaver_error--crossover with--dataset/ETHPy150Open BD2KGenomics/toil/src/toil/batchSystems/jobDispatcher.py/JobDispatcher._updatePredecessorStatus