feat: stapler challenge for self discovery
This commit is contained in:
@@ -204,6 +204,17 @@ class TestRequestHandler(BaseHandlerTestCase):
|
||||
):
|
||||
handler.do_HEAD()
|
||||
|
||||
def test_do_head_stapler(self) -> None:
|
||||
handler = self._get_handler("/.well-known/stapler/something")
|
||||
with (
|
||||
self.expects_status_only(
|
||||
handler,
|
||||
http.HTTPStatus.NO_CONTENT,
|
||||
),
|
||||
self.seal_mocks(),
|
||||
):
|
||||
handler.do_HEAD()
|
||||
|
||||
def test_do_head_forward(self) -> None:
|
||||
handler = self._get_handler("/file")
|
||||
with (
|
||||
@@ -222,6 +233,17 @@ class TestRequestHandler(BaseHandlerTestCase):
|
||||
):
|
||||
handler.do_GET()
|
||||
|
||||
def test_do_get_stapler(self) -> None:
|
||||
handler = self._get_handler("/.well-known/stapler/something")
|
||||
with (
|
||||
self.expects_status_only(
|
||||
handler,
|
||||
http.HTTPStatus.NO_CONTENT,
|
||||
),
|
||||
self.seal_mocks(),
|
||||
):
|
||||
handler.do_GET()
|
||||
|
||||
def test_do_get_forward_on_other_path(self) -> None:
|
||||
handler = self._get_handler("/file")
|
||||
with (
|
||||
@@ -1373,3 +1395,14 @@ class TestUpgradeHandler(BaseHandlerTestCase):
|
||||
self.seal_mocks(),
|
||||
):
|
||||
handler.do_HEAD()
|
||||
|
||||
def test_do_head_stapler(self) -> None:
|
||||
handler = self._get_handler("/.well-known/stapler/something")
|
||||
with (
|
||||
self.expects_status_only(
|
||||
handler,
|
||||
http.HTTPStatus.NO_CONTENT,
|
||||
),
|
||||
self.seal_mocks(),
|
||||
):
|
||||
handler.do_HEAD()
|
||||
|
||||
Reference in New Issue
Block a user