{
"event": "PreToolUse",
"tool_name": "Write",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/crawler\/tests\/unit\/domain\/test_url_normalizer_service.py",
"content": "from __future__ import annotations\n\nfrom src.domain.services.url_normalizer import UrlNormalizer\n\n\ndef test_service_delegates_to_normalize() -> None:\n n = UrlNormalizer(strip_tracking=False).normalize(\"HTTPS:\/\/Example.com\/x\")\n assert n.scheme == \"https\"\n assert n.host == \"example.com\"\n\n\ndef test_service_strips_tracking_when_enabled() -> None:\n n = UrlNormalizer(strip_tracking=True).normalize(\n \"https:\/\/example.com\/?utm_source=x&keep=1\",\n )\n assert \"utm_source\" not in n.query\n assert \"keep=1\" in n.query\n"
}
}
{
"tool_response": {
"type": "create",
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/crawler\/tests\/unit\/domain\/test_url_normalizer_service.py",
"content": "from __future__ import annotations\n\nfrom src.domain.services.url_normalizer import UrlNormalizer\n\n\ndef test_service_delegates_to_normalize() -> None:\n n = UrlNormalizer(strip_tracking=False).normalize(\"HTTPS:\/\/Example.com\/x\")\n assert n.scheme == \"https\"\n assert n.host == \"example.com\"\n\n\ndef test_service_strips_tracking_when_enabled() -> None:\n n = UrlNormalizer(strip_tracking=True).normalize(\n \"https:\/\/example.com\/?utm_source=x&keep=1\",\n )\n assert \"utm_source\" not in n.query\n assert \"keep=1\" in n.query\n",
"structuredPatch": [],
"originalFile": null,
"userModified": false
}
}