import os
from pathlib import Path

import pytest

from src.validators.types import parse_manifest, Manifest


def test_manifest_model_parses_sample(tmp_path: Path):
    sample = """
files:
  - path: data/file1.txt
    evidence_excerpt: "some evidence"
  - file_path: data/file2.txt
    evidence_excerpt: "other evidence"
"""
    p = tmp_path / "manifest.yaml"
    p.write_text(sample, encoding="utf-8")

    manifest = parse_manifest(str(p))
    assert isinstance(manifest, Manifest)
    assert len(manifest.files) == 2
    assert manifest.files[0]["path"] == "data/file1.txt"
    assert manifest.files[1]["path"] == "data/file2.txt"
