def setUp(self): super(SimpleServiceCheckTest, self).setUp() good_check = SimpleServiceCheck( endpoint="http://%s:%s/simple/good/" % (settings.FAKE_APP_HOST, settings.FAKE_APP_PORT), service=self.service) good_check.save() self.good_checks.append(good_check) bad_check = SimpleServiceCheck( endpoint="http://%s:%s/simple/bad/" % (settings.FAKE_APP_HOST, settings.FAKE_APP_PORT), service=self.service) bad_check.save() self.bad_checks.append(bad_check)
def setUp(self): self.user = User.objects.create_user(username="******", password="******") self.user.save() self.client = Client() self.assertTrue(self.client.login(username="******", password="******")) self.service = Service(name="test service") self.service.save() self.checks = [] simple_check = SimpleServiceCheck(endpoint="http://google.com", service=self.service) simple_check.save() compare_check = CompareServiceCheck(endpoint="http://google.com", field="", compared_value="test_value", service=self.service) compare_check.save() sensu_check = SensuServiceCheck(sensu_check_name="test_check", service=self.service) sensu_check.save() umpire_check = UmpireServiceCheck(umpire_metric="good_metric", service=self.service) umpire_check.save() self.checks.append(simple_check) self.checks.append(compare_check) self.checks.append(sensu_check) self.checks.append(umpire_check)