def test_sensu_event_for_last_run_state_invalid(): with raises(ValueError): check_chronos_jobs.sensu_event_for_last_run_state(100)
def test_sensu_event_for_last_run_state_not_run(): result = check_chronos_jobs.sensu_event_for_last_run_state(chronos_tools.LastRunState.NotRun) assert result == pysensu_yelp.Status.OK
def test_sensu_event_for_last_run_state_fail(): result = check_chronos_jobs.sensu_event_for_last_run_state(chronos_tools.LastRunState.Fail) assert result == pysensu_yelp.Status.CRITICAL