feat: add robots.txt and favicon by default
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user