test(downloader): fix test_sidecar_written_and_findable for post-first minimal sidecar (#856)
CI / lint (push) Successful in 3s
CI / frontend-build (push) Successful in 19s
CI / backend-lint-and-test (push) Successful in 30s
CI / integration (push) Successful in 3m18s

The per-media sidecar no longer carries title/url/content (post-first, #856) —
update the assertion to expect image identity only (category/id/source_url).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-15 10:15:04 -04:00
parent dcbc3ae335
commit 8b99dc9b81
+5 -2
View File
@@ -174,8 +174,11 @@ def test_sidecar_written_and_findable(tmp_path):
data = json.loads(sidecar.read_text())
assert data["category"] == "patreon"
assert data["id"] == "1001"
assert data["title"] == "My Post Title"
assert data["url"] == "https://www.patreon.com/posts/1001"
# Post-first (#856): the per-media sidecar carries image identity ONLY — no
# post body/title/url. The post-record (`_post.json`) owns those now.
assert "title" not in data
assert "url" not in data
assert "content" not in data
# #830 Phase 2: the per-media sidecar records THIS file's CDN URL so the
# importer can persist its filehash for inline-image localization.
assert data["source_url"] == "https://cdn.patreon.com/media1.png"