feat: stapler challenge for self discovery

This commit is contained in:
2026-06-03 18:56:07 +02:00
parent 24b29f5716
commit c5f3e53d88
2 changed files with 50 additions and 2 deletions
+33
View File
@@ -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()