def test_disable_job(self): ''' Tests disabling a job ''' self.schedule.opts = {'schedule': {'name': {'enabled': 'foo'}}} Schedule.disable_job(self.schedule, 'name') self.assertFalse(self.schedule.opts['schedule']['name']['enabled'])
def test_disable_job(self): ''' Tests disabling a job ''' self.schedule.opts.update({'schedule': {'name': {'enabled': 'foo'}}, 'pillar': {}}) Schedule.disable_job(self.schedule, 'name') self.assertFalse(self.schedule.opts['schedule']['name']['enabled'])
def test_disable_job_pillar(self): ''' Tests ignoring disable a job in pillar ''' self.schedule.opts.update({'pillar': {'schedule': {'name': {'enabled': True}}}, 'schedule': {}}) Schedule.disable_job(self.schedule, 'name', persist=False) self.assertTrue(self.schedule.opts['pillar']['schedule']['name']['enabled'])
def test_disable_job_pillar(self): ''' Tests disabling a job in pillar ''' self.schedule.opts.update({'pillar': {'schedule': {'name': {'enabled': 'foo'}}}}) Schedule.disable_job(self.schedule, 'name', persist=False, where='pillar') self.assertFalse(self.schedule.opts['pillar']['schedule']['name']['enabled'])
def test_disable_job(self): ''' Tests disabling a job ''' self.schedule.opts.update({'schedule': {'name': {'enabled': 'foo'}}}) Schedule.disable_job(self.schedule, 'name') self.assertFalse(self.schedule.opts['schedule']['name']['enabled'])
def test_disable_job_pillar(self): ''' Tests disabling a job in pillar ''' self.schedule.opts.update({'pillar': {'schedule': {'name': {'enabled': 'foo'}}}}) Schedule.disable_job(self.schedule, 'name', persist=False, where='pillar') del self.schedule.opts['sock_dir'] self.assertFalse(self.schedule.opts['pillar']['schedule']['name']['enabled'])
def test_disable_job_pillar(self): ''' Tests disabling a job in pillar ''' self.schedule.opts = {'pillar': {'schedule': {'name': {'enabled': 'foo'}}}, 'sock_dir': SOCK_DIR} Schedule.disable_job(self.schedule, 'name', persist=False, where='pillar') del self.schedule.opts['sock_dir'] self.assertFalse(self.schedule.opts['pillar']['schedule']['name']['enabled'])
def test_disable_job(self): ''' Tests disabling a job ''' self.schedule.opts = {'schedule': {'name': {'enabled': 'foo'}}, 'sock_dir': SOCK_DIR} Schedule.disable_job(self.schedule, 'name') del self.schedule.opts['sock_dir'] self.assertFalse(self.schedule.opts['schedule']['name']['enabled'])
def test_disable_job_pillar(self): ''' Tests disabling a job in pillar ''' self.schedule.opts = {'pillar': {'schedule': {'name': {'enabled': 'foo'}}}, 'sock_dir': SOCK_DIR} Schedule.disable_job(self.schedule, 'name', where='pillar') del self.schedule.opts['sock_dir'] self.assertFalse(self.schedule.opts['pillar']['schedule']['name']['enabled'])
def test_disable_job(schedule): """ Tests disabling a job """ schedule.opts.update({ "schedule": { "name": { "enabled": "foo" } }, "pillar": {} }) Schedule.disable_job(schedule, "name") assert not schedule.opts["schedule"]["name"]["enabled"]
def test_disable_job(self): """ Tests disabling a job """ self.schedule.opts.update({ "schedule": { "name": { "enabled": "foo" } }, "pillar": {} }) Schedule.disable_job(self.schedule, "name") self.assertFalse(self.schedule.opts["schedule"]["name"]["enabled"])
def test_disable_job_pillar(schedule): """ Tests ignoring disable a job in pillar """ schedule.opts.update({ "pillar": { "schedule": { "name": { "enabled": True } } }, "schedule": {} }) Schedule.disable_job(schedule, "name", persist=False) assert schedule.opts["pillar"]["schedule"]["name"]["enabled"]