Read date trust only from the readers' declarations, now that every reader declares

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-09-30 09:39:07 +02:00
1 parent 5f0f4ad5b7
commit 3adafd8950
2 files changed
+6 -67

No files matched your search

+2 -3
View File
@@ -539,15 +539,14 @@ def test_posted_at_trusts_only_a_known_host() -> None:
def test_a_reader_that_declares_reads_decides_its_own_date_trust(
monkeypatch: pytest.MonkeyPatch) -> None:
"""`fields.posted` of a declared reader wins over the fallback set, either
way; a reader without `READS`, or a provider that is none, keeps it."""
"""`fields.posted` of the reader decides, either way; a host with no
reader is not trusted."""
import app.models as models
monkeypatch.setattr(models, "_declared_posted",
lambda: {"greenhouse": "listed", "gem": "trusted"})
assert not trusted_posted("greenhouse")
assert trusted_posted("gem")
assert trusted_posted("jobindex")
assert not trusted_posted("taleo")