{
"event": "PreToolUse",
"tool_name": "Write",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/crawler\/tests\/unit\/domain\/test_image_entity.py",
"content": "from __future__ import annotations\n\nfrom src.domain.entities.image import Image\n\n\ndef _img(alt: str | None) -> Image:\n return Image(\n id=None, page_id=1, src=\"\/x.png\", alt=alt, title=None, width=None, height=None,\n loading_attr=None, decoding_attr=None, http_status=None, content_length=None,\n )\n\n\ndef test_has_alt_true_for_non_empty() -> None:\n assert _img(\"logo\").has_alt\n\n\ndef test_has_alt_false_for_none() -> None:\n assert not _img(None).has_alt\n\n\ndef test_has_alt_false_for_whitespace() -> None:\n assert not _img(\" \").has_alt\n"
}
}
{
"tool_response": {
"type": "create",
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/crawler\/tests\/unit\/domain\/test_image_entity.py",
"content": "from __future__ import annotations\n\nfrom src.domain.entities.image import Image\n\n\ndef _img(alt: str | None) -> Image:\n return Image(\n id=None, page_id=1, src=\"\/x.png\", alt=alt, title=None, width=None, height=None,\n loading_attr=None, decoding_attr=None, http_status=None, content_length=None,\n )\n\n\ndef test_has_alt_true_for_non_empty() -> None:\n assert _img(\"logo\").has_alt\n\n\ndef test_has_alt_false_for_none() -> None:\n assert not _img(None).has_alt\n\n\ndef test_has_alt_false_for_whitespace() -> None:\n assert not _img(\" \").has_alt\n",
"structuredPatch": [],
"originalFile": null,
"userModified": false
}
}