You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
419 B

  1. from django.test import TestCase
  2. from hc.api.models import Check
  3. class StatusTestCase(TestCase):
  4. def test_it_works(self):
  5. check = Check()
  6. check.save()
  7. r = self.client.get("/status/%s/" % check.code)
  8. self.assertContains(r, "last_ping", status_code=200)
  9. def test_it_handles_bad_uuid(self):
  10. r = self.client.get("/status/not-uuid/")
  11. assert r.status_code == 400