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

from django.test import TestCase
from hc.api.models import Check
class StatusTestCase(TestCase):
def test_it_works(self):
check = Check()
check.save()
r = self.client.get("/status/%s/" % check.code)
self.assertContains(r, "last_ping", status_code=200)
def test_it_handles_bad_uuid(self):
r = self.client.get("/status/not-uuid/")
assert r.status_code == 400