Readers oracle to workday and the providers hand on the host's words; their word tables move to app/prep/hosts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a66aac95cf
commit
06eb929eaf
48 files changed
+460
-388
No files matched your search
+10
-11
@@ -54,8 +54,8 @@ def test_rows_read_the_listing_of_a_tenant_that_sends_remote_type() -> None:
|
||||
"Associate-Solutions-Architect_R35358")
|
||||
assert first["posted"] == TODAY
|
||||
assert first["description"] == "" and first["department"] == "" and first["salary_text"] == ""
|
||||
# "Fully Flexible" is Zendesk's word for remote.
|
||||
assert [r["remote"] for r in rows] == ["remote", "onsite", "hybrid", "remote", "hybrid"]
|
||||
# The host's own words, "Fully Flexible" among them; prep maps them.
|
||||
assert [r["remote"] for r in rows] == ["Fully Flexible", "In Office", "Hybrid", "Fully Flexible", "Hybrid"]
|
||||
|
||||
|
||||
def test_rows_of_a_tenant_without_remote_type_leave_remote_unknown() -> None:
|
||||
@@ -80,7 +80,7 @@ def test_rows_of_a_site_called_jobs_state_the_requisition_id_and_no_date_past_30
|
||||
assert rows[1]["places"] == [{"text": "Remote US TX", "remote": True}]
|
||||
assert rows[2]["url"].startswith("https://redhat.wd5.myworkdayjobs.com/jobs/job/")
|
||||
assert rows[3]["posted"] is None # "Posted 30+ Days Ago" says only that it is older
|
||||
assert [r["remote"] for r in rows] == ["onsite", "remote", "remote", "hybrid"]
|
||||
assert [r["remote"] for r in rows] == ["Onsite", "Remote", "Remote", "Hybrid"]
|
||||
|
||||
|
||||
@pytest.mark.parametrize(("text", "expected"), [
|
||||
@@ -275,13 +275,12 @@ def test_detail_reads_the_description_date_remote_and_place_of_the_role() -> Non
|
||||
SLUG, row)
|
||||
assert asked == [f"https://{HOST}/wday/cxs/zendesk/zendesk"
|
||||
"/job/Remote-Mexico-City-Mexico/Associate-Solutions-Architect_R35358"]
|
||||
assert set(got) == {"description", "location", "places", "posted", "remote", "country",
|
||||
"employment"}
|
||||
assert set(got) == {"description", "location", "places", "posted", "remote", "employment"}
|
||||
assert got["posted"] == datetime(2026, 9, 29, tzinfo=UTC)
|
||||
assert got["remote"] == "remote"
|
||||
assert got["remote"] == "Fully Flexible"
|
||||
assert got["location"] == "Remote, Mexico City, Mexico"
|
||||
assert got["places"] == [{"text": "Remote, Mexico City, Mexico", "remote": True}]
|
||||
assert (got["country"], got["employment"]) == ("MX", "full_time")
|
||||
assert got["employment"] == "Full time" and "country" not in got
|
||||
assert got["description"].startswith("Job Description") or len(got["description"]) > 200
|
||||
assert "<" not in got["description"] and " " not in got["description"]
|
||||
assert " " not in got["description"]
|
||||
@@ -296,7 +295,7 @@ def test_detail_names_every_location_of_a_role_listed_as_several() -> None:
|
||||
"/job/Remote-Italy/Telco-Cloud-Consultant_R-059566-2"]
|
||||
assert got["location"] == "Remote Italy; Remote Spain"
|
||||
assert [p["text"] for p in got["places"]] == ["Remote Italy", "Remote Spain"]
|
||||
assert "country" not in got # the code belongs to the main location alone
|
||||
assert "country" not in got
|
||||
|
||||
|
||||
def _detail(**info: Any) -> bytes:
|
||||
@@ -337,9 +336,9 @@ def test_a_country_dash_city_place_is_turned_round() -> None:
|
||||
assert workday._place("12 Locations", None) is None
|
||||
|
||||
|
||||
def test_detail_takes_no_word_for_remote_it_does_not_know() -> None:
|
||||
def test_detail_hands_on_a_word_for_remote_it_does_not_know() -> None:
|
||||
row = workday.rows(_load("workday.json"), SLUG)[0]
|
||||
assert "remote" not in workday.detail(_get_of(_detail(remoteType="No"), []), SLUG, row)
|
||||
assert workday.detail(_get_of(_detail(remoteType="No"), []), SLUG, row)["remote"] == "No"
|
||||
|
||||
|
||||
def test_detail_refuses_a_row_that_is_not_a_role_of_the_board() -> None:
|
||||
@@ -383,7 +382,7 @@ def test_detail_is_read_through_the_getter_ats_binds(
|
||||
monkeypatch.setattr(ats, "_get", fake_get)
|
||||
row = workday.rows(_load("workday.json"), SLUG)[0]
|
||||
got = workday.detail(ats._getter(object(), "workday", SLUG), SLUG, row) # type: ignore[arg-type]
|
||||
assert got["remote"] == "remote"
|
||||
assert got["remote"] == "Fully Flexible"
|
||||
assert seen[0][:2] == ("workday", SLUG)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user