"""Pentest attack_paths integration."""

from pathlib import Path

from mcts.core.config import ScanConfig
from mcts.pentest.runner import run_pentest


def test_pentest_paths_populated() -> None:
    report = run_pentest(
        ScanConfig(target=Path("examples/vulnerable-mcp-server/server.py"), scoring_mode="v2"),
        run_fuzz=False,
    )
    attack_phase = next(p for p in report.phases if p.name == "attack_chains")
    assert attack_phase.findings > 0
    assert report.absolute_risk is not None
    assert report.verdict == "critical"


def test_pentest_verdict_uses_v2_risk_level() -> None:
    report = run_pentest(
        ScanConfig(target=Path("examples/baseline-mcp-server/server.py"), scoring_mode="v2"),
        run_fuzz=False,
    )
    assert report.absolute_risk is not None
    assert report.verdict in {"low", "medium", "high", "critical", "pass"}
