Readers ashby to lever 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
6c7ce1090d
37 files changed
+504
-171
No files matched your search
@@ -47,15 +47,15 @@ def test_a_listing_becomes_rows() -> None:
|
||||
assert second["url"] == "https://configit.bamboohr.com/careers/37"
|
||||
assert second["department"] == "Marketing" and rows[0]["department"] == ""
|
||||
assert second["location"] == "København Ø"
|
||||
assert second["remote"] == "hybrid"
|
||||
assert second["remote"] == "2"
|
||||
assert (second["posted"], second["description"], second["salary_text"]) == (None, "", "")
|
||||
|
||||
|
||||
@pytest.mark.parametrize(("flag", "kind", "remote"), [
|
||||
(True, "0", "remote"), (None, "0", "onsite"), (None, "1", "remote"), (None, "2", "hybrid"),
|
||||
(None, None, None), (False, "7", None)])
|
||||
(True, "0", True), (None, "0", "0"), (None, "1", "1"), (None, "2", "2"),
|
||||
(None, None, None), (False, "7", "7")])
|
||||
def test_remote_is_the_flag_then_the_location_type(
|
||||
flag: bool | None, kind: str | None, remote: str | None) -> None:
|
||||
flag: bool | None, kind: str | None, remote: bool | str | None) -> None:
|
||||
body = json.loads(_read("bamboohr.json"))
|
||||
body["result"][0] |= {"isRemote": flag, "locationType": kind}
|
||||
assert bamboohr.parse(json.dumps(body).encode(), "configit")[0]["remote"] == remote
|
||||
@@ -102,7 +102,7 @@ def test_detail_reads_the_text_the_date_and_the_country() -> None:
|
||||
assert found["posted"] == datetime(2026, 9, 23, tzinfo=UTC)
|
||||
assert found["location"] == "København Ø, Denmark"
|
||||
assert found["places"] == [{"text": "København Ø, Denmark", "remote": None}]
|
||||
assert found["remote"] == "hybrid"
|
||||
assert found["remote"] == "2"
|
||||
text = found["description"]
|
||||
assert text.startswith("Our Global Marketing Team is looking for")
|
||||
assert "Skills & Experience" in text and "&" not in text and "<" not in text
|
||||
@@ -144,11 +144,11 @@ def test_the_board_and_its_details_are_read_with_the_json_accept_on_the_detail()
|
||||
def test_the_role_states_one_place_and_the_employment() -> None:
|
||||
rows = bamboohr.parse(_read("bamboohr.json"), "configit")
|
||||
assert rows[1]["places"] == [{"text": "København Ø", "remote": None}]
|
||||
assert rows[1]["employment"] == "full_time"
|
||||
assert rows[1]["employment"] == "Full-Time"
|
||||
body = json.loads(_read("bamboohr.json"))
|
||||
body["result"][0] |= {"employmentStatusLabel": "Seasonal", "location": {"city": None}}
|
||||
first = bamboohr.parse(json.dumps(body).encode(), "configit")[0]
|
||||
assert first["places"] == [] and "employment" not in first
|
||||
assert first["places"] == [] and first["employment"] == "Seasonal"
|
||||
|
||||
|
||||
def test_it_declares_what_it_reads() -> None:
|
||||
|
||||
Reference in new issue
Block a user