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
@@ -17,7 +17,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, bamboohr # noqa: E402
|
||||
from plugins.readers import Ask, _runner, bamboohr # noqa: E402
|
||||
|
||||
FIXTURES = ROOT / "tests" / "fixtures" / "ats"
|
||||
|
||||
@@ -84,11 +84,16 @@ def test_a_page_that_is_not_a_listing_raises_and_an_empty_board_is_no_rows() ->
|
||||
bamboohr.parse(body, "configit")
|
||||
|
||||
|
||||
def test_a_role_without_a_title_or_an_id_is_left_out() -> None:
|
||||
def test_a_role_without_a_title_or_an_id_reaches_the_runner_and_is_dropped_there() -> None:
|
||||
body = json.loads(_read("bamboohr.json"))
|
||||
body["result"][0]["jobOpeningName"] = " "
|
||||
body["result"][1]["id"] = None
|
||||
assert bamboohr.parse(json.dumps(body).encode(), "configit") == []
|
||||
raw = json.dumps(body).encode()
|
||||
rows = bamboohr.parse(raw, "configit")
|
||||
assert len(rows) == 2 and not any(map(_runner.valid, rows))
|
||||
listing = _runner.read_listing(bamboohr, "configit", lambda url, **kw: raw)
|
||||
assert (listing.rows, listing.ids, listing.complete) == ([], [], True)
|
||||
assert (listing.handed, listing.dropped) == (2, 2)
|
||||
|
||||
|
||||
def test_detail_reads_the_text_the_date_and_the_country() -> None:
|
||||
|
||||
Reference in new issue
Block a user