test(downloader): fix test_sidecar_written_and_findable for post-first minimal sidecar (#856)
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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user