"""Disclaimer-Linter: Wort-Grenzen — Rechtsbegriffe passieren, Claims geblockt."""

from __future__ import annotations

from datetime import datetime, timezone

from compliance.services.specialist_agents._base import (
    AgentOutput,
    Finding,
    Severity,
    lint_output,
)


def _out(action: str) -> AgentOutput:
    now = datetime.now(timezone.utc)
    f = Finding(check_id="X", agent="t", agent_version="1",
                severity=Severity.MEDIUM, title="Titel", action=action)
    return AgentOutput(agent="t", agent_version="1", started_at=now,
                       finished_at=now, duration_ms=0, findings=[f])


def test_schutzgarantien_not_scrubbed():
    out = lint_output(_out("Geeignete Schutzgarantien nach Art. 46 angeben."))
    assert "Schutzgarantien" in out.findings[0].action
    assert "neutraler Wortlaut" not in out.findings[0].action


def test_garantiert_claim_still_blocked():
    out = lint_output(_out("Dies ist garantiert konform."))
    assert "garantiert" not in out.findings[0].action.lower()
    assert "neutraler Wortlaut" in out.findings[0].action
