from pathlib import Path from meine_app.data import build_snapshot from meine_app.package import InputPackageDraft, freitext_sections def test_build_snapshot_counts_packages(tmp_path: Path): manifest_dir = tmp_path / "pkg-test" manifest_dir.mkdir() (manifest_dir / "manifest.json").write_text( '{"id":"pkg-test","name":"Test","created":"2026-01-01"}', encoding="utf-8", ) draft = InputPackageDraft(name="Neu", text_sections=freitext_sections("hello")) snapshot = build_snapshot(draft, tmp_path) assert snapshot.package_count == 1 assert snapshot.draft.text_sections[0].content == "hello"