def Run(self): self.CreateCronJob(flow_name=cron_system.OSBreakDown.__name__, token=self.token) self.Check("ForceRunCronJob", args=cron_plugin.ApiForceRunCronJobArgs( cron_job_id=cron_system.OSBreakDown.__name__))
def testCronJobMethodsAreAccessChecked(self): args = api_cron.ApiForceRunCronJobArgs(cron_job_id="TestCronJob") self.CheckMethodIsAccessChecked( self.router.ForceRunCronJob, "CheckCronJobAccess", args=args) args = api_cron.ApiModifyCronJobArgs(cron_job_id="TestCronJob") self.CheckMethodIsAccessChecked( self.router.ModifyCronJob, "CheckCronJobAccess", args=args) args = api_cron.ApiDeleteCronJobArgs(cron_job_id="TestCronJob") self.CheckMethodIsAccessChecked( self.router.DeleteCronJob, "CheckCronJobAccess", args=args)