feat: add robots.txt and favicon by default

This commit is contained in:
2026-05-06 14:31:33 +02:00
parent 64f45e9779
commit b0d98dd48b
4 changed files with 24 additions and 2 deletions
+15
View File
@@ -1192,6 +1192,21 @@ class TestRequestHandler(BaseHandlerTestCase):
None,
)
def test_translate_path_with_host_favicon(self) -> None:
handler = self._get_handler(headers={"Host": "example.com"})
with (
self.mock_call(self.registry.get_from_host, ["example.com"], Page("path")),
self.patch_call(
"http.server.SimpleHTTPRequestHandler.translate_path",
["/favicon.ico"],
),
self.seal_mocks(),
):
self.assertEqual(
handler.translate_path("/favicon.ico"),
None,
)
def test_translate_path_default_host(self) -> None:
handler = self._get_handler()
with (