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)
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.good_checks = [] self.bad_checks = [] self.unknown_checks = []