forked from GithubBackups/healthchecks
Test for HEAD method, note about IPv6
This commit is contained in:
parent
655f51e1d2
commit
d81555687e
@ -26,6 +26,15 @@ class PingTestCase(TestCase):
|
||||
r = csrf_client.post("/ping/%s/" % check.code)
|
||||
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):
|
||||
r = self.client.get("/ping/not-uuid/")
|
||||
assert r.status_code == 400
|
||||
|
@ -23,7 +23,8 @@ It is all very simple, really.</p>
|
||||
</p>
|
||||
<ul>
|
||||
<li>HTTP and HTTPS protocols both are fine</li>
|
||||
<li>Request method can be GET or POST</li>
|
||||
<li>Request method can be GET, POST or HEAD</li>
|
||||
<li>Both IPv4 and IPv6 work</li>
|
||||
<li>It does not matter what request headers you send</li>
|
||||
<li>You can leave request body empty or put anything in it, it's all good</li>
|
||||
</ul>
|
||||
|
Loading…
x
Reference in New Issue
Block a user