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
@@ -18,7 +18,7 @@ if str(ROOT) not in sys.path:
|
||||
|
||||
from app.jobs import discover # noqa: E402
|
||||
from plugins import ats, readers # noqa: E402
|
||||
from plugins.readers import Ask, eightfold # noqa: E402
|
||||
from plugins.readers import Ask, _runner, eightfold # noqa: E402
|
||||
|
||||
FIXTURES = ROOT / "tests" / "fixtures" / "ats"
|
||||
SLUG = "jobs.ericsson.com/ericsson.com"
|
||||
@@ -93,10 +93,12 @@ def test_the_work_location_option_is_the_hosts_word(
|
||||
assert eightfold.rows([_position(1) | {"workLocationOption": option}], SLUG)[0]["remote"] == remote
|
||||
|
||||
|
||||
def test_a_position_without_a_name_an_id_or_a_path_is_left_out() -> None:
|
||||
def test_a_position_without_a_name_an_id_or_a_path_is_handed_over_for_the_runner_to_drop() -> None:
|
||||
bad = [_position(1) | {"name": " "}, _position(2) | {"id": None},
|
||||
_position(3) | {"positionUrl": ""}, _position(4) | {"positionUrl": "//evil.example/x"}]
|
||||
assert eightfold.rows(bad, SLUG) == []
|
||||
rows = eightfold.rows(bad, SLUG)
|
||||
assert len(rows) == 4 and not any(map(_runner.valid, rows))
|
||||
assert [r["url"] for r in rows[2:]] == ["", ""] # no link built off the host
|
||||
|
||||
|
||||
def test_the_standardized_location_stands_in_when_there_is_no_raw_one() -> None:
|
||||
|
||||
Reference in new issue
Block a user