diff --git a/hc/api/models.py b/hc/api/models.py index 4929bb89..0c88ab00 100644 --- a/hc/api/models.py +++ b/hc/api/models.py @@ -227,7 +227,6 @@ class Check(models.Model): else: self.last_start = None self.last_ping = timezone.now() - self.last_ping_was_fail = action == "fail" new_status = "down" if action == "fail" else "up" if self.status != new_status: diff --git a/hc/api/tests/test_ping.py b/hc/api/tests/test_ping.py index b9747a27..c98501fe 100644 --- a/hc/api/tests/test_ping.py +++ b/hc/api/tests/test_ping.py @@ -128,22 +128,11 @@ class PingTestCase(TestCase): self.check.refresh_from_db() self.assertTrue(self.check.has_confirmation_link) - def test_ping_resets_fail_flag(self): - self.check.last_ping_was_fail = True - self.check.save() - - r = self.client.get("/ping/%s/" % self.check.code) - self.assertEqual(r.status_code, 200) - - self.check.refresh_from_db() - self.assertFalse(self.check.last_ping_was_fail) - def test_fail_endpoint_works(self): r = self.client.get("/ping/%s/fail" % self.check.code) self.assertEqual(r.status_code, 200) self.check.refresh_from_db() - self.assertTrue(self.check.last_ping_was_fail) self.assertEqual(self.check.status, "down") self.assertEqual(self.check.alert_after, None)