|
@ -26,6 +26,15 @@ class PingTestCase(TestCase): |
|
|
r = csrf_client.post("/ping/%s/" % check.code) |
|
|
r = csrf_client.post("/ping/%s/" % check.code) |
|
|
assert r.status_code == 200 |
|
|
assert r.status_code == 200 |
|
|
|
|
|
|
|
|
|
|
|
def test_head_works(self): |
|
|
|
|
|
check = Check() |
|
|
|
|
|
check.save() |
|
|
|
|
|
|
|
|
|
|
|
csrf_client = Client(enforce_csrf_checks=True) |
|
|
|
|
|
r = csrf_client.head("/ping/%s/" % check.code) |
|
|
|
|
|
assert r.status_code == 200 |
|
|
|
|
|
assert Ping.objects.count() == 1 |
|
|
|
|
|
|
|
|
def test_it_handles_bad_uuid(self): |
|
|
def test_it_handles_bad_uuid(self): |
|
|
r = self.client.get("/ping/not-uuid/") |
|
|
r = self.client.get("/ping/not-uuid/") |
|
|
assert r.status_code == 400 |
|
|
assert r.status_code == 400 |
|
|