File size: 641 Bytes
04cd8c5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 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"
|