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
@@ -315,7 +315,7 @@ def _detail(name: str, url: str = "https://careers.vestas.com/job/x/1431772533/"
|
||||
return successfactors.detail(get, "careers.vestas.com", {"url": url}) # type: ignore[arg-type]
|
||||
|
||||
|
||||
def test_detail_reads_the_description_the_date_and_the_country_code_of_an_address() -> None:
|
||||
def test_detail_reads_the_description_the_date_and_the_places_of_an_address() -> None:
|
||||
got = _detail("successfactors-job.html")
|
||||
assert got["description"].startswith("Senior Management | Full-Time | Commercial Are you")
|
||||
assert "<" not in got["description"]
|
||||
@@ -324,7 +324,7 @@ def test_detail_reads_the_description_the_date_and_the_country_code_of_an_addres
|
||||
# The locality and the country's name; the region is cut to "Seou" by the site.
|
||||
assert got["location"] == "Seoul, South Korea"
|
||||
assert got["places"] == [{"text": "Seoul, South Korea", "remote": None}]
|
||||
assert got["country"] == "KR"
|
||||
assert "country" not in got # prep derives it from the places
|
||||
|
||||
|
||||
def test_detail_keeps_every_address_of_a_role_at_several_places() -> None:
|
||||
@@ -333,15 +333,6 @@ def test_detail_keeps_every_address_of_a_role_at_several_places() -> None:
|
||||
assert [p["text"] for p in got["places"]] == [
|
||||
"Seoul, South Korea", "Busan, South Korea", "Aarhus, Denmark"]
|
||||
assert got["location"] == "Seoul, South Korea; Busan, South Korea; Aarhus, Denmark"
|
||||
assert "country" not in got # KR and DK: no single country for the role
|
||||
|
||||
|
||||
def test_detail_states_the_country_when_every_address_is_in_it() -> None:
|
||||
text = _read("successfactors-places-detail.html").replace(
|
||||
'content="Aarhus, DK, 8200"', 'content="Daegu, KR, 41200"')
|
||||
got = successfactors.detail(lambda url, **kw: text.encode(), "careers.vestas.com",
|
||||
{"url": "https://careers.vestas.com/job/x/1/"})
|
||||
assert got["country"] == "KR"
|
||||
|
||||
|
||||
def test_the_listing_place_is_the_roles_only_place_until_its_page_is_read() -> None:
|
||||
@@ -351,11 +342,10 @@ def test_the_listing_place_is_the_roles_only_place_until_its_page_is_read() -> N
|
||||
for r in rows)
|
||||
|
||||
|
||||
def test_detail_reads_the_country_from_a_street_address() -> None:
|
||||
def test_detail_reads_the_place_from_a_street_address() -> None:
|
||||
"""Systematic and most other sites give one `streetAddress`, "City, CC, zip"."""
|
||||
got = _detail("successfactors-job-street.html")
|
||||
assert got["location"] == "Bern, Switzerland"
|
||||
assert got["country"] == "CH"
|
||||
assert got["posted"] == datetime(2026, 9, 28, 2, tzinfo=UTC)
|
||||
assert got["description"].startswith("Senior Solution Engineer Defence")
|
||||
|
||||
|
||||
Reference in new issue
Block a user