Declare READS for Oracle, Personio, Phenom, Pinpoint, Recruitee, Rippling, SmartRecruiters, SuccessFactors, Teamtailor, Workable and Workday
Every row carries places (Personio additionalOffices, Workable and Recruitee locations[], every SuccessFactors address, Workday's own read), the list teaser of Phenom and Oracle is kept in teaser, and the level, employment and country a host states are mapped. Workday "N Locations" and "Country - City", and Recruitee "Remote job", are no longer places. Phenom takes dateCreated as posted. robots_page and ROBOTS_ANY_CASE go; READS.robots records the decision. Signatures are feed_url(slug, ask) and page(get, slug, cursor, ask), with an empty Ask as the default so the runner of today still calls them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4c0da58da7
commit
4316624769
42 files changed
+3126
-199
No files matched your search
+18
-15
@@ -88,10 +88,11 @@ def test_detail_reads_description_places_date_and_a_single_yearly_range() -> Non
|
||||
found = rippling.detail(_get((FIXTURES / "rippling-role.json").read_bytes(), asked),
|
||||
"rippling", row)
|
||||
assert asked == [f"https://api.rippling.com/platform/api/ats/v1/board/rippling/jobs/{DIRECTOR}"]
|
||||
assert set(found) <= set(ats.DETAIL_FIELDS)
|
||||
assert found["description"].startswith("About The Role")
|
||||
assert "<" not in found["description"]
|
||||
assert found["location"] == "San Francisco, CA; Seattle, WA; New York, NY"
|
||||
assert [p["text"] for p in found["places"]] == ["San Francisco, CA", "Seattle, WA", "New York, NY"]
|
||||
assert found["employment"] == "full_time" # employmentType.label SALARIED_FT
|
||||
assert found["posted"] is not None and found["posted"].isoformat() == \
|
||||
"2025-04-07T12:29:19.348000-07:00"
|
||||
assert (found["salary_min"], found["salary_max"], found["currency"]) == (216000, 378000, "USD")
|
||||
@@ -102,6 +103,7 @@ def test_detail_without_pay_leaves_the_pay_columns_out() -> None:
|
||||
"prisma-careers", {"source_id": "x"})
|
||||
assert found["description"].startswith("What is it like to work at Prisma?")
|
||||
assert found["location"] == "Remote (Germany)"
|
||||
assert found["places"] == [{"text": "Remote (Germany)", "remote": True}]
|
||||
assert not {"salary_min", "salary_max", "currency"} & set(found)
|
||||
|
||||
|
||||
@@ -155,16 +157,6 @@ def test_the_board_is_one_request_and_complete(web: dict[str, Any]) -> None:
|
||||
assert len(rows) == 5 and complete and web["asked"] == [FEED]
|
||||
|
||||
|
||||
def test_robots_are_read_from_the_site_and_disallow_only_internal(
|
||||
web: dict[str, Any]) -> None:
|
||||
web["answers"]["https://ats.rippling.com/robots.txt"] = b"User-agent: *\nDisallow: /internal/\n"
|
||||
with httpx.Client() as client:
|
||||
ats._check_robots(client, "rippling:prisma-careers")
|
||||
web["answers"]["https://ats.rippling.com/robots.txt"] = b"User-agent: *\nDisallow: /\n"
|
||||
with pytest.raises(ats._Disallowed):
|
||||
ats._check_robots(client, "rippling:prisma-careers")
|
||||
|
||||
|
||||
# ------------------------------------------------------- slugs and hosts
|
||||
|
||||
def test_the_module_is_registered_as_a_feed_host_with_detail() -> None:
|
||||
@@ -173,10 +165,10 @@ def test_the_module_is_registered_as_a_feed_host_with_detail() -> None:
|
||||
assert hasattr(rippling, "detail") and not hasattr(rippling, "page")
|
||||
|
||||
|
||||
def test_the_urls_and_the_robots_page() -> None:
|
||||
def test_the_urls() -> None:
|
||||
assert rippling.feed_url("rippling") == FEED
|
||||
assert rippling.careers_url("prisma-careers") == "https://ats.rippling.com/prisma-careers/jobs"
|
||||
assert rippling.robots_page("prisma-careers") == rippling.careers_url("prisma-careers")
|
||||
assert not hasattr(rippling, "robots_page") # decided when built, see READS.robots
|
||||
allow = rippling.allowed("rippling")
|
||||
assert allow("api.rippling.com") and allow("ATS.RIPPLING.COM")
|
||||
for host in ("rippling.com", "www.rippling.com", "api.rippling.com.evil.example", "localhost"):
|
||||
@@ -199,8 +191,7 @@ def test_a_hostile_slug_is_refused(slug: str) -> None:
|
||||
|
||||
def test_no_slug_reaches_another_host() -> None:
|
||||
for slug in ("rippling", "Prisma-Careers", "a-b_c"):
|
||||
for url in (rippling.feed_url(slug), rippling.careers_url(slug),
|
||||
rippling.robots_page(slug)):
|
||||
for url in (rippling.feed_url(slug), rippling.careers_url(slug)):
|
||||
assert httpx.URL(url).host in ("api.rippling.com", "ats.rippling.com")
|
||||
|
||||
|
||||
@@ -210,3 +201,15 @@ def test_discovery_finds_the_board_slug() -> None:
|
||||
'<script>fetch("https://api.rippling.com/platform/api/ats/v1/board/beta/jobs")</script>')
|
||||
assert [(h, s) for h, s, _ in boards_in(page)] == [
|
||||
("rippling", "prisma-careers"), ("rippling", "Acme"), ("rippling", "beta")]
|
||||
|
||||
|
||||
def test_a_role_at_several_places_keeps_each_once_and_is_remote_only_if_all_are() -> None:
|
||||
rows = {r["source_id"]: r for r in rippling.parse(BOARD, "rippling")}
|
||||
director = rows[DIRECTOR]
|
||||
assert [p["text"] for p in director["places"]] == [
|
||||
"San Francisco, CA", "Seattle, WA", "New York, NY"]
|
||||
assert director["location"] == "San Francisco, CA; Seattle, WA; New York, NY"
|
||||
assert director["remote"] is None
|
||||
remote = next(r for r in rows.values() if r["places"] == [
|
||||
{"text": "Remote (United States)", "remote": True}])
|
||||
assert remote["remote"] is True
|
||||
Reference in new issue
Block a user