def test_rm_job_is_absent(self): with patch.dict(cron.__grains__, {'os': None}), \ patch('salt.modules.cron._write_cron_lines', new=MagicMock(return_value={'retcode': False})), \ patch('salt.modules.cron.raw_cron', new=MagicMock(return_value=STUB_SIMPLE_RAW_CRON)): ret = cron.rm_job('DUMMY_USER', '/bin/echo NOT A DROID', 1, 2, 3, 4, 5) self.assertEqual('absent', ret)
def test_rm_job_is_absent(self): with patch.dict(cron.__grains__, {'os': None}): ret = cron.rm_job('DUMMY_USER', '/bin/echo NOT A DROID', 1, 2, 3, 4, 5) self.assertEqual('absent', ret)