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:
1 parent
38c31c830b
commit
911dfe8584
58 files changed
+479
-203
No files matched your search
@@ -19,7 +19,7 @@ if str(ROOT) not in sys.path:
|
||||
|
||||
from app.jobs.discover import boards_in # noqa: E402
|
||||
from plugins import ats # noqa: E402
|
||||
from plugins.readers import phenom # noqa: E402
|
||||
from plugins.readers import _runner, phenom # noqa: E402
|
||||
from plugins.readers._shared import is_web_url # noqa: E402
|
||||
|
||||
FIXTURES = ROOT / "tests" / "fixtures" / "ats"
|
||||
@@ -101,13 +101,15 @@ def test_a_title_with_nothing_to_make_a_slug_of_has_a_page_by_id_alone() -> None
|
||||
"https://careers.king.com/us/en/job/ACMKDSUSR028168EXTERNALENUS"
|
||||
|
||||
|
||||
def test_a_role_without_title_or_id_is_left_out() -> None:
|
||||
def test_a_role_without_title_or_id_is_dropped_by_the_runner() -> None:
|
||||
data = _answer()
|
||||
jobs = data["refineSearch"]["data"]["jobs"]
|
||||
jobs[0]["title"] = ""
|
||||
for key in ("jobSeqNo", "jobId", "reqId"):
|
||||
jobs[1].pop(key, None)
|
||||
assert [r["source_id"] for r in phenom.parse(json.dumps(data).encode(), SLUG)] == IDS[2:]
|
||||
rows = phenom.parse(json.dumps(data).encode(), SLUG)
|
||||
assert len(rows) == len(IDS)
|
||||
assert [r["source_id"] for r in rows if _runner.valid(r)] == IDS[2:]
|
||||
|
||||
|
||||
# ---------------------------------------------------------- the request
|
||||
|
||||
Reference in new issue
Block a user