Hosts a to l declare READS: places, teaser, stated seniority and employment
Ashby, BambooHR, Deel, Eightfold, Gem, Greenhouse, HiBob, HR Manager, Jibe, Jobylon and Lever move to feed_url(slug, ask) and page(get, slug, cursor, ask), declare READS with the robots decision, and drop robots_page. Rows carry places (Ashby secondaryLocations, Lever allLocations, Greenhouse offices in place of a Hybrid placeholder), Jobylon keeps its summary as teaser and maps experience and employment, Eightfold reads creationTs as the posting date and Ashby reads workplaceType. Fixtures <name>-places.* and jobylon-teaser.html drive the conformance checks; the eleven names leave UNDECLARED. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4c0da58da7
commit
f2e652a8da
35 files changed
+1290
-391
No files matched your search
@@ -0,0 +1,41 @@
|
||||
"""The Lever host module's places, country and employment, against a small
|
||||
saved board. No network. The pay and the plain row are in `test_ats.py`."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
if str(ROOT) not in sys.path:
|
||||
sys.path.insert(0, str(ROOT))
|
||||
|
||||
from plugins.readers import Ask, lever # noqa: E402
|
||||
|
||||
BOARD = (ROOT / "tests" / "fixtures" / "ats" / "lever-places.json").read_bytes()
|
||||
|
||||
|
||||
def test_every_place_of_all_locations_is_kept_once() -> None:
|
||||
several, one = lever.parse(BOARD, "acme")
|
||||
assert several["places"] == [{"text": "London", "remote": None},
|
||||
{"text": "Stockholm", "remote": None}]
|
||||
assert several["location"] == "London; Stockholm"
|
||||
assert one["places"] == [{"text": "Berlin", "remote": None}]
|
||||
|
||||
|
||||
def test_the_country_is_only_taken_for_a_role_at_one_place() -> None:
|
||||
several, one = lever.parse(BOARD, "acme")
|
||||
assert "country" not in several and one["country"] == "DE"
|
||||
|
||||
|
||||
def test_the_commitment_is_mapped_and_a_permanent_one_is_left_unmapped() -> None:
|
||||
several, one = lever.parse(BOARD, "acme")
|
||||
assert several["employment"] == "full_time" and "employment" not in one
|
||||
|
||||
|
||||
def test_it_declares_a_whole_listing_of_trusted_dates_and_no_robots_check() -> None:
|
||||
reads = lever.READS
|
||||
assert (reads.listing, reads.text, reads.places) == ("whole", "listing", "many")
|
||||
assert reads.fields.posted == "trusted" and reads.fields.country == "stated"
|
||||
assert reads.robots == "api: no robots.txt check needed (public board API), 2026-09-30"
|
||||
assert lever.feed_url("eu/tomtom", Ask()) == "https://api.eu.lever.co/v0/postings/tomtom?mode=json"
|
||||
Reference in new issue
Block a user