Let the runner drop and count a row without an id, a title or a link, as ADR Plugins 3.8 has it, in one place for whole, paged and search reads: the count is stamped per target, logged, named on the board's row, and over 10% of the rows fails the read; the 28 readers hand every listing over instead of skipping it

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Fable 5.1 committed 2026-10-06 14:04:33 +02:00
1 parent 38c31c830b
commit 911dfe8584
58 files changed
+479 -203

No files matched your search

+6 -3
View File
@@ -16,7 +16,7 @@ if str(ROOT) not in sys.path:
sys.path.insert(0, str(ROOT))
from plugins import readers # noqa: E402
from plugins.readers import Ask, jobnet # noqa: E402
from plugins.readers import Ask, _runner, jobnet # noqa: E402
FIXTURES = ROOT / "tests" / "fixtures" / "search"
PLACES = (FIXTURES / "jobnet-places.json").read_bytes()
@@ -100,9 +100,12 @@ def test_the_deadline_is_kept_in_raw_and_1900_means_none() -> None:
assert "applicationDeadline" not in row
def test_an_ad_without_an_id_or_a_title_is_skipped() -> None:
def test_an_ad_without_an_id_or_a_title_is_handed_over_for_the_runner_to_drop() -> None:
ads = json.loads(OTHER)["jobAds"]
assert jobnet.rows({"jobAds": [ads[0] | {"title": " "}, ads[1] | {"jobAdId": ""}]}, "") == []
rows = jobnet.rows({"jobAds": [ads[0] | {"title": " "}, ads[1] | {"jobAdId": ""}]}, "")
assert [(row["source_id"] == "", row["title"] == "") for row in rows] == [
(False, True), (True, False)]
assert not any(map(_runner.valid, rows))
def test_it_sends_the_header_the_region_and_the_page_number() -> None: