Add Platsbanken as a third search provider
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b6afe24eaa
commit
00e111961e
4 files changed
+257
-12
No files matched your search
@@ -303,3 +303,19 @@ def test_replacing_or_detaching_a_board_forgets_that_it_was_failing(
|
||||
store.state[FAILING + "ashby:acme"] = '{"since": "2026-09-01T00:00:00+00:00", "reason": "timeout"}'
|
||||
sources.detach_board(store, "acme")
|
||||
assert failing_boards(store) == {}
|
||||
|
||||
|
||||
def test_search_params_keeps_only_what_the_provider_reads() -> None:
|
||||
assert sources.search_params("jobindex", " python ", area=1, region="CaRE_1nn_cSU") == {
|
||||
"q": "python", "area": 1}
|
||||
assert sources.search_params("platsbanken", "data", area=1, country="de") == {
|
||||
"q": "data", "region": ""}
|
||||
assert sources.search_params("platsbanken", "data", region=" CaRE_1nn_cSU ", pages=3) == {
|
||||
"q": "data", "region": "CaRE_1nn_cSU", "pages": 3}
|
||||
|
||||
|
||||
def test_search_params_refuses_a_region_that_is_no_swedish_lan() -> None:
|
||||
with pytest.raises(ValueError, match="region"):
|
||||
sources.search_params("platsbanken", "data", region="zYpL_aGk_QY8") # Midland
|
||||
with pytest.raises(ValueError, match="provider"):
|
||||
sources.search_params("indeed", "data")
|
||||
Reference in new issue
Block a user