Merge branch 'wp-d1-hosts'
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
1d7b286374
36 files changed
+1297
-366
No files matched your search
Vendored
+38
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"jobs": [
|
||||
{
|
||||
"id": "a1",
|
||||
"title": "Research Engineer",
|
||||
"department": "Research",
|
||||
"team": "Safety",
|
||||
"location": "San Francisco",
|
||||
"secondaryLocations": [
|
||||
{
|
||||
"location": "London, UK"
|
||||
},
|
||||
{
|
||||
"location": "Remote - US"
|
||||
}
|
||||
],
|
||||
"employmentType": "FullTime",
|
||||
"workplaceType": "Hybrid",
|
||||
"isRemote": true,
|
||||
"publishedAt": "2026-09-01T00:00:00Z",
|
||||
"jobUrl": "https://ashby.example/a1",
|
||||
"descriptionHtml": "<p>Do research.</p>"
|
||||
},
|
||||
{
|
||||
"id": "a2",
|
||||
"title": "Recruiter",
|
||||
"department": "People",
|
||||
"location": "Dublin",
|
||||
"secondaryLocations": [],
|
||||
"employmentType": "Contract",
|
||||
"workplaceType": "Remote",
|
||||
"isRemote": true,
|
||||
"publishedAt": "2026-09-02T00:00:00Z",
|
||||
"jobUrl": "https://ashby.example/a2",
|
||||
"descriptionHtml": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"meta": {
|
||||
"totalCount": 1
|
||||
},
|
||||
"result": [
|
||||
{
|
||||
"id": "9",
|
||||
"jobOpeningName": "Analyst",
|
||||
"departmentLabel": "Finance",
|
||||
"employmentStatusLabel": "Part-Time",
|
||||
"location": {
|
||||
"city": "Aarhus",
|
||||
"state": null
|
||||
},
|
||||
"atsLocation": {
|
||||
"country": "Denmark",
|
||||
"state": null,
|
||||
"city": null
|
||||
},
|
||||
"isRemote": null,
|
||||
"locationType": "0"
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
<!DOCTYPE html><html lang="en"><head><title>Klarna Careers</title></head><body><div id="root"></div>
|
||||
<script>self.__next_f.push([0])</script>
|
||||
<script>self.__next_f.push([1,"20:T365,<h2><strong>Klarna, briefly</strong></h2><p>At Klarna, we're building an everyday finance network, helping over 120 million consumers across 26 countries save time and money, and worry less about their finances. Working here means taking on problems most companies never get to solve, and being hands-on enough that the interesting part of the work lands with you, not someone else, you'll build with AI, not watch it happen.</p><p></p><p>This is the stretch zone. Come find out what you're capable of.</p><h2><strong>About the role</strong></h2><p>When Klarna's systems or security posture come under real pressure, someone has to take charge of the response in real time - coordinating the right technical teams, keeping decisions moving, and closing the loop with senior stakeholders instead of letting action items stall. That's what this position exists to do.</p>21:T21,<p><strong>About the position</p>22:T340,<p><strong>Klarna, briefly</strong></p><p>At Klarna, we're building an everyday finance network, helping over 120 million consumers across 26 countries save time and money, and worry less about their finances. Working here means taking on problems most companies never get to solve, and being hands-on enough that the interesting part of the work lands with you, not someone else, you'll build with AI, not watch it happen.</p><p>This is the stretch zone. Come find out what you're capable of.</p><p></p><p><strong>About the role</strong></p><p>Some customer cases aren't simple, a payment dispute needs untangling, an account question needs real judgment, a pattern needs to be flagged before it turns into ten more tickets. That work sits with Klarna's Customer Trust & Experience team, and it's what this position covers.</p>23:T380,<p><strong>Klarna, briefly</strong></p><p>At Klarna, we're building an everyday finance network, helping over 120 million consumers across 26 countries save time and money, and worry less about their finances. Working here means taking on problems most companies never get to solve, and being hands-on enough that the interesting part of the work lands with you, not someone else — you'll build with AI, not watch it happen.</p><p>This is the stretch zone. Come find out what you're capable of.</p><p></p><p></p><p><strong>About the role</strong></p><p>The Secure Development team equips Klarna's engineers to design, build, and deliver secure software through standardized tools and processes, continuous learning, and a security-focused engineering culture. As a Lead Engineer on the team, you'll work on preventing security flaws before they reach production, not cleaning them up after.</p>24:T314,<p><strong>Klarna, briefly</strong></p><p>At Klarna, we're building an everyday finance network, helping over 120 million consumers across 26 countries save time and money, and worry less about their finances. Working here means taking on problems most companies never get to solve, and being hands-on enough that the interesting part of the work lands with you, not someone else — you'll build with AI, not watch it happen.</p><p>This is the stretch zone. Come find out what you're capable of.</p><p><strong>About the role</strong></p><p>Every payment, login, and stored card in Klarna's iOS and Android apps depends on mobile-specific protections holding up — sandboxing, permission models, anti-tampering — and someone has to attack them before someone else does. That's you.</p>5:[\"$\",\"div\",null,{\"jobPostings\":[{\"id\":\"21584046-56d5-44c4-8b18-7e15dc659827\",\"jobId\":\"f9740e2a-e19c-4674-ac84-f6c200f6a713\",\"title\":\"Incident Manager\",\"richtextDescription\":\"$20\",\"applicationFormId\":\"0877b7a6-6b23-43b8-8002-f881005d4918\",\"isCompensationVisible\":true,\"createdAt\":\"2026-09-07T12:27:01.452Z\",\"updatedAt\":\"2026-09-09T07:09:42.074Z\",\"job\":{\"id\":\"f97"])</script>
|
||||
<script>self.__next_f.push([1,"40e2a-e19c-4674-ac84-f6c200f6a713\",\"workArrangementEnum\":\"ON_SITE\",\"jobEmploymentTypes\":[{\"id\":\"ca91fc4a-eb82-46c5-a171-cc50fa592436\",\"employmentType\":{\"id\":\"62e0c8ef-78c9-4cc8-ae0a-2930c60b6271\",\"name\":\"Full-time\"}}],\"jobLocations\":[{\"id\":\"fb39f226-9f16-4458-86b1-2da0bfd84030\",\"location\":{\"id\":\"39d5aaa0-6e90-48e5-8c98-14c04a7c34ca\",\"name\":\"Stockholm\"}}],\"currentCompensation\":{\"id\":\"37af691b-c172-4347-82cd-706045c098b6\",\"currencyIsoCode\":\"SEK\",\"minAmount\":775398,\"maxAmount\":1108832},\"tags\":[],\"jobTeams\":[{\"id\":\"bcca1eb3-4e74-4d11-a729-f64390d6d518\",\"team\":{\"id\":\"8c9d80d6-70f2-4a98-8388-46e4e3c02a47\",\"name\":\"Engineering\"}}],\"jobDepartments\":[{\"id\":\"3eb1563e-9a47-4230-90e5-6b70655b4b32\",\"department\":{\"id\":\"ae2801c1-dea4-4f1c-aaec-a00d678dd005\",\"name\":\"Engineering\"}}]},\"jobPostingPublications\":[{\"id\":\"34787ccf-3b72-4002-87fc-858d5ecbc0c4\",\"currentState\":{\"id\":\"d2ea4fdd-7f64-4744-b438-ab3496da141d\",\"stateSlug\":\"published_basic\",\"createdByHrisOrganizationUserId\":\"b8fe15d6-a262-4eb5-98cf-65ae5e866d97\",\"errorMessage\":null,\"createdAt\":\"2026-09-07T12:33:38.484Z\"},\"jobBoard\":{\"id\":\"c12332fe-4f66-4d3e-9941-156ddeacf0dc\"}}]},{\"id\":\"a66b42b6-eda9-4184-ad67-0601d14a9375\",\"jobId\":\"3f9527a4-60d2-4c14-b098-9676d888404b\",\"title\":\"Workforce Management Lead - Fincrime Operations\",\"richtextDescription\":\"$21\",\"applicationFormId\":\"0877b7a6-6b23-43b8-8002-f881005d4918\",\"isCompensationVisible\":true,\"createdAt\":\"2026-09-07T16:17:10.087Z\",\"updatedAt\":\"2026-09-07T16:17:10.087Z\",\"job\":{\"id\":\"3f9527a4-60d2-4c14-b098-9676d888404b\",\"workArrangementEnum\":\"ON_SITE\",\"jobEmploymentTypes\":[{\"id\":\"1ecf4a71-6353-4815-b917-6bbeb392dabc\",\"employmentType\":{\"id\":\"62e0c8ef-78c9-4cc8-ae0a-2930c60b6271\",\"name\":\"Full-time\"}}],\"jobLocations\":[{\"id\":\"ff0c5113-c7dc-4633-988f-a029ff50251b\",\"location\":{\"id\":\"91b000b1-6da9-44e5-af7b-26978f343d94\",\"name\":\"London\"}}],\"currentCompensation\":{\"id\":\"403661d6-7cf8-491b-968e-da7a508443ce\",\"currencyIsoCode\":\"GBP\",\"minAmount\":105197,\"maxAmount\":null},\"tags\":[],\"jobTeams\":[],\"jobDepartments\":[{\"id\":\"e97b8c54-d137-4e58-98c0-a87351d68d7e\",\"department\":{\"id\":\"c92b3787-be1b-4c03-bae4-7eb2d846d8d5\",\"name\":\"Business Operations\"}}]},\"jobPostingPublications\":[{\"id\":\"644e5928-e7a9-4bd7-a8a4-00deac2b798e\",\"currentState\":{\"id\":\"6f91ce37-9c0f-4cec-bda2-1c85d0144040\",\"stateSlug\":\"published_basic\",\"createdByHrisOrganizationUserId\":\"8963fdb9-9da3-4121-a5b7-1f2954ef8acb\",\"errorMessage\":null,\"createdAt\":\"2026-09-07T16:19:17.990Z\"},\"jobBoard\":{\"id\":\"c12332fe-4f66-4d3e-9941-156ddeacf0dc\"}}]},{\"id\":\"f96bb9d4-7a81-4e1e-be01-76c643eb6cb3\",\"jobId\":\"1734819d-d38e-425b-97a0-fcbeee1cb981\",\"title\":\"Customer Trust and Experience Agent (Fully Remote - Ohio) - Business Operations\",\"richtextDescription\":\"$22\",\"applicationFormId\":\"741ad1fc-6325-4c82-bec4-0919a40256cd\",\"isCompensationVisible\":false,\"createdAt\":\"2026-08-28T05:32:40.645Z\",\"updatedAt\":\"2026-09-17T13:14:24.329Z\",\"job\":{\"id\":\"1734819d-d38e-425b-97a0-fcbeee1cb981\",\"workArrangementEnum\":\"REMOTE\",\"jobEmploymentTypes\":[{\"id\":\"d7ecac74-0f15-43f5-abc1-045c1cb1debd\",\"employmentType\":{\"id\":\"209bdf13-fe8a-44ef-ae53-2f39265470ae\",\"name\":\"Consultant\"}}],\"jobLocations\":[{\"id\":\"dc918550-918d-4fce-8c70-dd6e2ef2e65f\",\"location\":{\"id\":\"a30feacc-5939-4622-b9e8-fe240bcaea9d\",\"name\":\"Ohio\"}}],\"currentCompensation\":null,\"tags\":[],\"jobTeams\":[{\"id\":\"733c5efb-71d7-42dd-890f-525a972f7dcf\",\"team\":{\"id\":\"c5f402cd-2f59-4d57-a6f2-d5542c41c656\",\"name\":\"Always Human\"}}],\"jobDepartments\":[{\"id\":\"44e383d7-9403-43e0-a751-b99bae9ccc0f\",\"department\":{\"id\":\"c92b3787-be1b-4c03-bae4-7eb2d846d8d5\",\"name\":\"Business Operations\"}}]},\"jobPostingPublications\":[{\"id\":\"d84ef0ae-8ec4-40f4-bb90-9ac1127a924c\",\"currentState\":{\"id\":\"835516dd-04cb-4137-ae2d-ee82e97fd3be\",\"stateSlug\":\"published_basic\",\"createdByHrisOrganizationUserId\":\"a139eb3c-8a7f-42a6-ac85-243776a0959a\",\"err"])</script>
|
||||
<script>self.__next_f.push([1,"orMessage\":null,\"createdAt\":\"2026-09-17T13:36:34.901Z\"},\"jobBoard\":{\"id\":\"c12332fe-4f66-4d3e-9941-156ddeacf0dc\"}}]},{\"id\":\"a8be45ac-b342-4be6-97af-ad2dd40b8479\",\"jobId\":\"14575daf-d794-44c0-8912-be34b80f809b\",\"title\":\"Lead Engineer — Application Security\",\"richtextDescription\":\"$23\",\"applicationFormId\":\"0877b7a6-6b23-43b8-8002-f881005d4918\",\"isCompensationVisible\":true,\"createdAt\":\"2026-08-28T08:15:13.007Z\",\"updatedAt\":\"2026-08-28T08:15:55.528Z\",\"job\":{\"id\":\"14575daf-d794-44c0-8912-be34b80f809b\",\"workArrangementEnum\":\"ON_SITE\",\"jobEmploymentTypes\":[{\"id\":\"25c78c72-12c9-4e89-84b0-e6a500e137b0\",\"employmentType\":{\"id\":\"62e0c8ef-78c9-4cc8-ae0a-2930c60b6271\",\"name\":\"Full-time\"}}],\"jobLocations\":[{\"id\":\"154a2fda-f232-45af-a5ae-be40153bcebc\",\"location\":{\"id\":\"39d5aaa0-6e90-48e5-8c98-14c04a7c34ca\",\"name\":\"Stockholm\"}},{\"id\":\"497b28a2-a723-488b-b216-e8c24b7196fe\",\"location\":{\"id\":\"91b000b1-6da9-44e5-af7b-26978f343d94\",\"name\":\"London\"}},{\"id\":\"b0530362-2136-4ba7-b552-1bf1fbe027d0\",\"location\":{\"id\":\"cfc33a04-4d3d-43d8-b36a-52550122d202\",\"name\":\"Milan\"}},{\"id\":\"129b9b2d-d039-4bbc-a0b4-79fde3bdcaf5\",\"location\":{\"id\":\"a31765f7-f872-404d-8abe-cc6075c47a1a\",\"name\":\"Warsaw\"}}],\"currentCompensation\":{\"id\":\"886da8d9-151d-41ba-915f-f0bec8555c00\",\"currencyIsoCode\":\"GBP\",\"minAmount\":91196,\"maxAmount\":116438},\"tags\":[],\"jobTeams\":[{\"id\":\"8ba298cd-9a19-486a-9114-9856ac72a0e7\",\"team\":{\"id\":\"8c9d80d6-70f2-4a98-8388-46e4e3c02a47\",\"name\":\"Engineering\"}}],\"jobDepartments\":[{\"id\":\"11635e3e-7c9d-4d3c-9448-54c24e9d9bb9\",\"department\":{\"id\":\"ae2801c1-dea4-4f1c-aaec-a00d678dd005\",\"name\":\"Engineering\"}}]},\"jobPostingPublications\":[{\"id\":\"efd1b98f-106b-4f28-907e-5f74ca5f9f96\",\"currentState\":{\"id\":\"3538ebd8-71aa-4047-8465-f65dd0590bfa\",\"stateSlug\":\"published_basic\",\"createdByHrisOrganizationUserId\":\"34023377-76e3-4853-a827-4d79fbb1a997\",\"errorMessage\":null,\"createdAt\":\"2026-08-28T08:25:01.991Z\"},\"jobBoard\":{\"id\":\"c12332fe-4f66-4d3e-9941-156ddeacf0dc\"}}]},{\"id\":\"a6649d86-1584-464a-b5bf-42457115df2f\",\"jobId\":\"ef1106d9-e2b7-4b76-9b13-bfb8e684d21b\",\"title\":\"Mobile Application Senior Security Engineer\",\"richtextDescription\":\"$24\",\"applicationFormId\":\"0877b7a6-6b23-43b8-8002-f881005d4918\",\"isCompensationVisible\":true,\"createdAt\":\"2026-08-26T13:17:25.890Z\",\"updatedAt\":\"2026-08-26T13:17:25.890Z\",\"job\":{\"id\":\"ef1106d9-e2b7-4b76-9b13-bfb8e684d21b\",\"workArrangementEnum\":\"ON_SITE\",\"jobEmploymentTypes\":[{\"id\":\"9cd3d4a4-969b-4e53-af20-a57eb5652ea6\",\"employmentType\":{\"id\":\"62e0c8ef-78c9-4cc8-ae0a-2930c60b6271\",\"name\":\"Full-time\"}}],\"jobLocations\":[{\"id\":\"e65f2062-92f6-4749-ad2c-f591a7641e7b\",\"location\":{\"id\":\"91b000b1-6da9-44e5-af7b-26978f343d94\",\"name\":\"London\"}},{\"id\":\"ec0540f0-7d51-4cc5-bb2c-d101abaff615\",\"location\":{\"id\":\"cfc33a04-4d3d-43d8-b36a-52550122d202\",\"name\":\"Milan\"}},{\"id\":\"70a36b00-f548-4276-8839-f2c666d659fb\",\"location\":{\"id\":\"39d5aaa0-6e90-48e5-8c98-14c04a7c34ca\",\"name\":\"Stockholm\"}},{\"id\":\"9b7e878d-718c-496f-ba3a-aa22d7744dbc\",\"location\":{\"id\":\"a31765f7-f872-404d-8abe-cc6075c47a1a\",\"name\":\"Warsaw\"}}],\"currentCompensation\":{\"id\":\"58771905-8f5c-4f47-b859-8c265cadb19e\",\"currencyIsoCode\":\"GBP\",\"minAmount\":91196,\"maxAmount\":116438},\"tags\":[],\"jobTeams\":[{\"id\":\"818c8081-5baa-40dd-a00d-2da2b9828c49\",\"team\":{\"id\":\"8c9d80d6-70f2-4a98-8388-46e4e3c02a47\",\"name\":\"Engineering\"}}],\"jobDepartments\":[{\"id\":\"82dfa249-8ab8-4847-ad67-8c7ba565dde5\",\"department\":{\"id\":\"ae2801c1-dea4-4f1c-aaec-a00d678dd005\",\"name\":\"Engineering\"}}]},\"jobPostingPublications\":[{\"id\":\"79fcf3a0-15d9-4a6a-b807-35d07cc1da39\",\"currentState\":{\"id\":\"01ef255c-3db1-4a47-af63-3e8161413c12\",\"stateSlug\":\"published_basic\",\"createdByHrisOrganizationUserId\":\"34023377-76e3-4853-a827-4d79fbb1a997\",\"errorMessage\":null,\"createdAt\":\"2026-08-26T13:49:29.953Z\"},\"jobBoard\":{\"id\":\"c12332fe-4f66-4d3e-9941-156ddeacf0dc\"}}]}],\"orgSlug\":\"klarna\"}]\n"])</script>
|
||||
</body></html>
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"status": 200,
|
||||
"data": {
|
||||
"count": 2,
|
||||
"positions": [
|
||||
{
|
||||
"id": 9001,
|
||||
"name": "Field Engineer",
|
||||
"locations": [
|
||||
"Stockholm,Stockholm,Sweden",
|
||||
"Gothenburg,Vastra Gotaland,Sweden"
|
||||
],
|
||||
"postedTs": 1790703782,
|
||||
"creationTs": 1785822052,
|
||||
"department": "Service",
|
||||
"workLocationOption": "hybrid",
|
||||
"positionUrl": "/careers/job/9001"
|
||||
},
|
||||
{
|
||||
"id": 9002,
|
||||
"name": "Buyer",
|
||||
"locations": [
|
||||
"Lund,Skane,Sweden"
|
||||
],
|
||||
"postedTs": 1790703782,
|
||||
"creationTs": 1785822052,
|
||||
"department": "Supply",
|
||||
"workLocationOption": "onsite",
|
||||
"positionUrl": "/careers/job/9002"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"data":{"oatsExternalJobPostings":{"jobPostings":[{"id":"T2F0c0pvYlBvc3Q6MTA0NDAzNA==","extId":"8080046002","title":"Staff AI Product Engineer (Prague/Brno/Remote EU)","locations":[{"id":"38771","name":"Prague (Hybrid)","city":"Prague","isoCountry":"CZE","isRemote":false,"extId":"4029634002"}],"job":{"id":"T2F0c0pvYjo2MDYxMDY=","department":{"id":"37338","name":"Product Engineering","extId":"4065161002"},"locationType":"HYBRID","employmentType":"FULL_TIME"}},{"id":"T2F0c0pvYlBvc3Q6NTY0ODcxMw==","extId":"am9icG9zdDpS7XehojHQK_NnncgSKWoQ","title":"Staff Full-stack Product Engineer (Prague/Brno/Remote EU)","locations":[{"id":"38771","name":"Prague (Hybrid)","city":"Prague","isoCountry":"CZE","isRemote":false,"extId":"4029634002"}],"job":{"id":"T2F0c0pvYjo2NjEyMTk=","department":{"id":"37338","name":"Product Engineering","extId":"4065161002"},"locationType":"HYBRID","employmentType":"FULL_TIME"}},{"id":"T2F0c0pvYlBvc3Q6NTY0ODcxNg==","extId":"am9icG9zdDqWC1V_RM7U6ORvTd1Iu64r","title":"Staff Backend Product Engineer (Prague/Brno/Remote EU)","locations":[{"id":"38771","name":"Prague (Hybrid)","city":"Prague","isoCountry":"CZE","isRemote":false,"extId":"4029634002"},{"id":"38772","name":"Remote Europe","city":"Remote Europe","isoCountry":"CZE","isRemote":true,"extId":"4030754002"},{"id":"38781","name":"Brno (Hybrid)","city":"Brno","isoCountry":"CZE","isRemote":false,"extId":"4051723002"}],"job":{"id":"T2F0c0pvYjoyMDg5NTcx","department":{"id":"37338","name":"Product Engineering","extId":"4065161002"},"locationType":"HYBRID","employmentType":"FULL_TIME"}},{"id":"T2F0c0pvYlBvc3Q6NzU2OTA5MQ==","extId":"am9icG9zdDpfq1dHcevndHGSzK_aYE1g","title":"Marketing Systems Operations Lead","locations":[{"id":"38780","name":"San Francisco","city":"San Francisco","isoCountry":"USA","isRemote":false,"extId":"4030598002"}],"job":{"id":"T2F0c0pvYjo2NTkyMzYy","department":{"id":"37379","name":"GTM Ops","extId":"4068217002"},"locationType":"HYBRID","employmentType":"FULL_TIME"}},{"id":"T2F0c0pvYlBvc3Q6NzU5NjA4Mg==","extId":"am9icG9zdDq5-IOakBvxHzWhMPnTzoPp","title":"Staff Fullstack DevX Engineer (Prague/Brno/Remote EU)","locations":[{"id":"38771","name":"Prague (Hybrid)","city":"Prague","isoCountry":"CZE","isRemote":false,"extId":"4029634002"},{"id":"38772","name":"Remote Europe","city":"Remote Europe","isoCountry":"CZE","isRemote":true,"extId":"4030754002"},{"id":"38781","name":"Brno (Hybrid)","city":"Brno","isoCountry":"CZE","isRemote":false,"extId":"4051723002"}],"job":{"id":"T2F0c0pvYjo2NjA4ODU3","department":{"id":"37338","name":"Product Engineering","extId":"4065161002"},"locationType":"HYBRID","employmentType":"FULL_TIME"}},{"id":"T2F0c0pvYlBvc3Q6NzYwMjE1NA==","extId":"am9icG9zdDoaMPkCxlUbsYDApcWCdyCP","title":"Staff Frontend Product Engineer (Prague/Brno/Remote EU)","locations":[{"id":"38771","name":"Prague (Hybrid)","city":"Prague","isoCountry":"CZE","isRemote":false,"extId":"4029634002"}],"job":{"id":"T2F0c0pvYjo2NjA4ODU4","department":{"id":"37338","name":"Product Engineering","extId":"4065161002"},"locationType":"HYBRID","employmentType":"FULL_TIME"}},{"id":"T2F0c0pvYlBvc3Q6NzYwMzc4Mg==","extId":"am9icG9zdDpGGIKW-IlxhJ2EnwVAtLRB","title":"Staff Full-stack Product Engineer, Growth (Prague/Brno/Remote EU) ","locations":[{"id":"38771","name":"Prague (Hybrid)","city":"Prague","isoCountry":"CZE","isRemote":false,"extId":"4029634002"}],"job":{"id":"T2F0c0pvYjo2NjEyMTk=","department":{"id":"37338","name":"Product Engineering","extId":"4065161002"},"locationType":"HYBRID","employmentType":"FULL_TIME"}},{"id":"T2F0c0pvYlBvc3Q6NzcyNzc0Ng==","extId":"am9icG9zdDq9ZHg3x3sdBTy6feA4MZ9f","title":"Digital Marketing Manager","locations":[{"id":"38780","name":"San Francisco","city":"San Francisco","isoCountry":"USA","isRemote":false,"extId":"4030598002"}],"job":{"id":"T2F0c0pvYjo2NjkyOTAw","department":{"id":"37358","name":"Digital Marketing","extId":"4076635002"},"locationType":"HYBRID","employmentType":"FULL_TIME"}},{"id":"T2F0c0pvYlBvc3Q6Nzk0NDYyMA==","extId":"am9icG9zdDp906RvIzQmjA9funJO3zB1","title":"AI Data Engineer","locations":[{"id":"38771","name":"Prague (Hybrid)","city":"Prague","isoCountry":"CZE","isRemote":false,"extId":"4029634002"},{"id":"38781","name":"Brno (Hybrid)","city":"Brno","isoCountry":"CZE","isRemote":false,"extId":"4051723002"}],"job":{"id":"T2F0c0pvYjo2ODE0MzAz","department":{"id":"37352","name":"Data","extId":"4076631002"},"locationType":"HYBRID","employmentType":"FULL_TIME"}},{"id":"T2F0c0pvYlBvc3Q6ODAzMTI0MQ==","extId":"am9icG9zdDqzuJaiLLHinwNQLMZuqlux","title":"Digital Marketing Specialist ","locations":[{"id":"38780","name":"San Francisco","city":"San Francisco","isoCountry":"USA","isRemote":false,"extId":"4030598002"}],"job":{"id":"T2F0c0pvYjo2NjkyOTAw","department":{"id":"37358","name":"Digital Marketing","extId":"4076635002"},"locationType":"HYBRID","employmentType":"FULL_TIME"}},{"id":"T2F0c0pvYlBvc3Q6ODA1NTY3NQ==","extId":"am9icG9zdDrYRR2Ri8264a07xF_f9eI3","title":"AI Customer Success Engineer ","locatioLine truncated
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"jobs": [
|
||||
{
|
||||
"id": 7001,
|
||||
"title": "Solutions Engineer",
|
||||
"location": {
|
||||
"name": "Hybrid"
|
||||
},
|
||||
"absolute_url": "https://gh.example/7001",
|
||||
"first_published": "2026-09-09T08:00:00-04:00",
|
||||
"departments": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Sales"
|
||||
}
|
||||
],
|
||||
"content": "",
|
||||
"offices": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Austin, TX",
|
||||
"location": "Austin, TX, United States"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "New York, NY",
|
||||
"location": "New York, New York, United States"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 7002,
|
||||
"title": "Support Engineer",
|
||||
"location": {
|
||||
"name": "Remote India"
|
||||
},
|
||||
"absolute_url": "https://gh.example/7002",
|
||||
"first_published": "2026-09-09T08:00:00-04:00",
|
||||
"departments": [],
|
||||
"content": "",
|
||||
"offices": [
|
||||
{
|
||||
"id": 3,
|
||||
"name": "Bangalore",
|
||||
"location": "Bangalore, India"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 7003,
|
||||
"title": "Designer",
|
||||
"location": {
|
||||
"name": "Lisbon, Portugal"
|
||||
},
|
||||
"absolute_url": "https://gh.example/7003",
|
||||
"first_published": "2026-09-09T08:00:00-04:00",
|
||||
"departments": [],
|
||||
"content": "",
|
||||
"offices": [
|
||||
{
|
||||
"id": 4,
|
||||
"name": "Lisbon",
|
||||
"location": "Lisbon, Portugal"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"filterGroups":{"departments":[{"serverId":"265204383","value":"General application"}],"sites":[{"serverId":"2556616","value":"Copenhagen"},{"serverId":"2556618","value":"London"}],"jobTypes":[{"serverId":"Permanent","value":"Permanent"}],"workspaceTypes":[{"serverId":"hybrid","value":"Hybrid"},{"serverId":"on_site","value":"On site"}]},"jobAdDetails":[{"id":"340dbb78-164e-4c82-b7aa-6b88d2661eea","title":"Expression of interest","departmentId":"265204383","department":"General application","employmentTypeId":"Permanent","employmentType":"Permanent","siteId":2556616,"site":"Copenhagen","country":"Denmark","language":"en","description":"We're always excited to connect with talented professionals who share our vision. If you believe your skills and experience would be a great fit for Dixa, we'd love to hear from you. Submit your resume below, and our team will reach out when an opportunity aligns with your expertise.","requirements":null,"responsibilities":null,"benefits":null,"sectionLabels":null,"publishedAt":"2025-10-14T12:58:32.138726405Z","workspaceTypeId":"hybrid","workspaceType":"Hybrid","payTransparencyMinSalary":null,"payTransparencyMaxSalary":null,"payTransparencySalaryCurrency":null,"payTransparencySalaryPayPeriod":null,"payTransparencySalaryAdditionalInfo":null},{"id":"b94be0ce-4a55-462f-99a6-5246395b3c08","title":"Expression of interest","departmentId":"265204383","department":"General application","employmentTypeId":"Permanent","employmentType":"Permanent","siteId":2556618,"site":"London","country":"United Kingdom","language":"en","description":"We're always excited to connect with talented professionals who share our vision. If you believe your skills and experience would be a great fit for Dixa, we'd love to hear from you. Submit your resume below, and our team will reach out when an opportunity aligns with your expertise.","requirements":"","responsibilities":"","benefits":"","sectionLabels":null,"publishedAt":"2026-02-27T15:42:31.845195914Z","workspaceTypeId":"on_site","workspaceType":"On site","payTransparencyMinSalary":null,"payTransparencyMaxSalary":null,"payTransparencySalaryCurrency":null,"payTransparencySalaryPayPeriod":null,"payTransparencySalaryAdditionalInfo":null}]}
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
<rss version="2.0" xmlns:a10="http://www.w3.org/2005/Atom"><channel><title>HR Manager Talent Recruiter - Position List</title><link>https://candidate.hr-manager.net/vacancies/list.aspx?customer=stsgroup_tr</link><description>HR Manager Talent Recruiter - Position List</description><lastBuildDate>Tue, 29 Sep 2026 20:11:15 +0200</lastBuildDate><item><guid isPermaLink="false">143857</guid><link>https://candidate.hr-manager.net/ApplicationInit.aspx?cid=2523&ProjectId=143857&DepartmentId=18958&MediaId=5</link><a10:author/><title>Commissioning Engineer- T&D</title><description><p><strong>About the Position</strong></p>
|
||||

|
||||
<p style="text-align:justify">We have an exciting opportunity for a Commissioning Engineer, to join STS Group T&D Division.</p>
|
||||

|
||||
<p style="text-align:justify">The position will be located in Ireland.</p>
|
||||

|
||||
<p style="text-align:justify"><br />
|
||||
STS Group, is dedicated to being the leading and most cost-efficient provider of electrical engineering, instrumentation, design and commissioning services across Ireland, UK, Europe and the Middle East. Since its formation, STS Group has broadened its scope to become a full-service provider to world renowned brand names in the Pharmaceutical, Data Centre, Utilities, Oil, Gas & Chemicals, Food & Beverage, Transport and other industry sectors.</p>
|
||||

|
||||
<p style="text-align:justify">Headquartered in Waterford, Ireland, STS Group is one of three business units within Dussmann Technical Solutions (DTS) and is a proud member of the Dussmann Group. STS Group employs the best people, invests heavily in training and education ensuring that the highest standards of health, safety and governance are applied throughout the organisation</p>
|
||||

|
||||
<p><br />
|
||||
<strong>What you will be doing?</strong></p>
|
||||

|
||||
<ul>
|
||||
<li></description><pubDate>Tue, 18 Mar 2025 17:31:36 +0100</pubDate><a10:link rel="alternate" type="text/html" title="Commissioning Engineer- T&D" length="9223372036854775807" href="https://candidate.hr-manager.net/ApplicationInit.aspx?cid=2523&ProjectId=143857&DepartmentId=18958&MediaId=5"/><a10:updated>2025-04-02T12:30:03+02:00</a10:updated><a10:content type="html"/></item><item><guid isPermaLink="false">143844</guid><link>https://candidate.hr-manager.net/ApplicationInit.aspx?cid=2523&ProjectId=143844&DepartmentId=18958&MediaId=5</link><a10:author/><title>Electrical Tester- Dublin</title><description><p>The Company</p>
|
||||

|
||||
<p>STS Group, is dedicated to being the leading and most cost-efficient provider of electrical engineering, instrumentation, design and commissioning services across Ireland, UK, Europe and the Middle East. Since its formation, STS Group has broadened its scope to become a full-service provider to world renowned brand names in the Pharmaceutical, Data Centre, Utilities, Oil, Gas & Chemicals, Food & Beverage, Transport and other industry sectors.</p>
|
||||

|
||||
<p>Headquartered in Waterford, Ireland, STS Group is one of three business units within Dussmann Technical Solutions (DTS) and is a proud member of the Dussmann Group. STS Group employs the best people, invests heavily in training and education ensuring that the highest standards of health, safety and governance are applied throughout the organisation.</p>
|
||||

|
||||
<p> </p>
|
||||

|
||||
<p> </p>
|
||||

|
||||
<p>*This company is an equal opportunities employer*</p>
|
||||

|
||||
<p> </p>
|
||||

|
||||
<p>Job description</p>
|
||||

|
||||
<p> </p>
|
||||

|
||||
<p> </p>
|
||||

|
||||
<p>Duties & Responsibilities:</p>
|
||||

|
||||
<ul>
|
||||
<li>Fully qualified Electrician with current <strong>Safe Electric (RECI) Certification</strong>.</li></description><pubDate>Tue, 18 Feb 2025 11:02:55 +0100</pubDate><a10:link rel="alternate" type="text/html" title="Electrical Tester- Dublin" length="9223372036854775807" href="https://candidate.hr-manager.net/ApplicationInit.aspx?cid=2523&ProjectId=143844&DepartmentId=18958&MediaId=5"/><a10:updated>2025-02-18T11:05:30+01:00</a10:updated><a10:content type="html"/></item><item><guid isPermaLink="false">143854</guid><link>https://candidate.hr-manager.net/ApplicationInit.aspx?cid=2523&ProjectId=143854&DepartmentId=18958&MediaId=5</link><a10:author/><title>Pre Apprentice- Dublin 15</title><description><p>Are you a pre Apprentice? Join Our Apprenticeship Program – Your Future Starts Here!</p>
|
||||

|
||||
<p>Are you ready to jumpstart your career in Electrical & Instrumentation? We're on the lookout for passionate pre-apprentices to join our team. Here’s why this opportunity is a game-changer:</p>
|
||||

|
||||
<p>What’s in It for You?</p>
|
||||

|
||||
<p>· Get Rewarded: Signing bonus plus a €1,000 Exceptional Performance Award for every successful apprenticeship year.</p>
|
||||

|
||||
<p>· Real-World Training: Learn by doing, with hands-on experience from day one.</p>
|
||||

|
||||
<p>· Globally Recognised Certification: Open doors anywhere in the world with industry-approved qualifications.</p>
|
||||

|
||||
<p>· Secure Your Future: Enjoy job stability and countless opportunities for growth.</p>
|
||||

|
||||
<p>· Climb the Ladder: Our "Beyond Apprentice" program fast-tracks your career progression.</p>
|
||||

|
||||
<p>· Work Variety: Gain experience in diverse environments and departments.</p>
|
||||

|
||||
<p>· Stay Ahead: Master cutting-edge technologies and stay at the forefront of innovation.</p>
|
||||

|
||||
<p>What You’ll Be Doing</p>
|
||||

|
||||
<p></description><pubDate>Tue, 11 Mar 2025 16:30:53 +0100</pubDate><a10:link rel="alternate" type="text/html" title="Pre Apprentice- Dublin 15" length="9223372036854775807" href="https://candidate.hr-manager.net/ApplicationInit.aspx?cid=2523&ProjectId=143854&DepartmentId=18958&MediaId=5"/><a10:updated>2025-03-11T16:32:11+01:00</a10:updated><a10:content type="html"/></item><item><guid isPermaLink="false">143849</guid><link>https://candidate.hr-manager.net/ApplicationInit.aspx?cid=2523&ProjectId=143849&DepartmentId=18958&MediaId=5</link><a10:author/><title>QS- Cork</title><description><p><strong>The Company</strong></p>
|
||||

|
||||
<p>STS Group, is dedicated to being the leading and most cost-efficient provider of electrical engineering, instrumentation, design and commissioning services across Ireland, UK, Europe and the Middle East. Since its formation, STS Group has broadened its scope to become a full-service provider to world renowned brand names in the Pharmaceutical, Data Centre, Utilities, Oil, Gas & Chemicals, Food & Beverage, Transport and other industry sectors.</p>
|
||||

|
||||
<p>Headquartered in Waterford, Ireland, STS Group is one of three business units within Dussmann Technical Solutions (DTS) and is a proud member of the Dussmann Group. STS Group employs the best people, invests heavily in training and education ensuring that the highest standards of health, safety and governance are applied throughout the organisation</p>
|
||||

|
||||
<p>*This company is an equal opportunities employer*</p>
|
||||

|
||||
<p> </p>
|
||||

|
||||
<p><strong>Quantity Surveyor Criteria:</strong></p>
|
||||

|
||||
<ul>
|
||||
<li>2+ years Post-Graduate experience with a Main Contractor/ Developer.</li>
|
||||
<li>Qualification in Quantity Surveying or similar area</li>
|
||||
<li></description><pubDate>Thu, 06 Mar 2025 15:30:00 +0100</pubDate><a10:link rel="alternate" type="text/html" title="QS- Cork" length="9223372036854775807" href="https://candidate.hr-manager.net/ApplicationInit.aspx?cid=2523&ProjectId=143849&DepartmentId=18958&MediaId=5"/><a10:updated>2025-03-06T15:33:46+01:00</a10:updated><a10:content type="html"/></item><item><guid isPermaLink="false">143848</guid><link>https://candidate.hr-manager.net/ApplicationInit.aspx?cid=2523&ProjectId=143848&DepartmentId=18958&MediaId=5</link><a10:author/><title>QS- Dublin</title><description><p><strong>The Company</strong></p>
|
||||

|
||||
<p>STS Group, is dedicated to being the leading and most cost-efficient provider of electrical engineering, instrumentation, design and commissioning services across Ireland, UK, Europe and the Middle East. Since its formation, STS Group has broadened its scope to become a full-service provider to world renowned brand names in the Pharmaceutical, Data Centre, Utilities, Oil, Gas & Chemicals, Food & Beverage, Transport and other industry sectors.</p>
|
||||

|
||||
<p>Headquartered in Waterford, Ireland, STS Group is one of three business units within Dussmann Technical Solutions (DTS) and is a proud member of the Dussmann Group. STS Group employs the best people, invests heavily in training and education ensuring that the highest standards of health, safety and governance are applied throughout the organisation</p>
|
||||

|
||||
<p>*This company is an equal opportunities employer*</p>
|
||||

|
||||
<p> </p>
|
||||

|
||||
<p><strong>Senior Quantity Surveyor Criteria:</strong></p>
|
||||

|
||||
<ul>
|
||||
<li>2 + years Post-Graduate experience with a Main Contractor/ Developer.</li>
|
||||
<li>Qualification in Quantity Surveying or similar area</li>
|
||||
<li></description><pubDate>Thu, 06 Mar 2025 15:11:42 +0100</pubDate><a10:link rel="alternate" type="text/html" title="QS- Dublin" length="9223372036854775807" href="https://candidate.hr-manager.net/ApplicationInit.aspx?cid=2523&ProjectId=143848&DepartmentId=18958&MediaId=5"/><a10:updated>2025-03-06T15:29:29+01:00</a10:updated><a10:content type="html"/></item></channel></rss>
|
||||
Vendored
+41
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"jobs": [
|
||||
{
|
||||
"data": {
|
||||
"slug": "1",
|
||||
"req_id": "1",
|
||||
"title": "Analyst",
|
||||
"description": "<p>x</p>",
|
||||
"city": "Amsterdam",
|
||||
"country": "Netherlands",
|
||||
"country_code": "NL",
|
||||
"full_location": "Amsterdam, Netherlands; Manchester, United Kingdom",
|
||||
"multipleLocations": true,
|
||||
"employment_type": "FULL_TIME",
|
||||
"categories": [
|
||||
{
|
||||
"name": "Finance"
|
||||
}
|
||||
],
|
||||
"posted_date": "2026-09-29T12:50:00+0000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"slug": "2",
|
||||
"req_id": "2",
|
||||
"title": "Clerk",
|
||||
"description": "<p>y</p>",
|
||||
"city": "Oslo",
|
||||
"country": "Norway",
|
||||
"country_code": "NO",
|
||||
"full_location": "Oslo, Norway",
|
||||
"multipleLocations": false,
|
||||
"employment_type": "PART_TIME",
|
||||
"categories": [],
|
||||
"posted_date": "2026-09-29T12:50:00+0000"
|
||||
}
|
||||
}
|
||||
],
|
||||
"totalCount": 2
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
<html><body><script>
|
||||
JBL.embed_v2['jobs'] = [
|
||||
{
|
||||
id: '501',
|
||||
url: '/jobs/501-acme-backend-engineer/',
|
||||
title: 'Backend Engineer',
|
||||
function: 'Engineering',
|
||||
locations: [
|
||||
'Stockholm',
|
||||
'Gothenburg',
|
||||
],
|
||||
workspace: 'Hybrid',
|
||||
experience: 'Mid level',
|
||||
employment_type: 'Full\u002Dtime',
|
||||
summary: 'None',
|
||||
published_date: 'Sept. 25, 2026',
|
||||
},
|
||||
{
|
||||
id: '502',
|
||||
url: '/jobs/502-acme-intern/',
|
||||
title: 'Intern',
|
||||
function: 'Engineering',
|
||||
locations: [
|
||||
'Malm\u00f6',
|
||||
],
|
||||
workspace: 'Hybrid',
|
||||
experience: 'Student',
|
||||
employment_type: 'Internship',
|
||||
summary: 'None',
|
||||
published_date: 'Sept. 25, 2026',
|
||||
},
|
||||
];
|
||||
</script></body></html>
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
<html><body><script>
|
||||
JBL.embed_v2['jobs'] = [
|
||||
{
|
||||
id: '503',
|
||||
url: '/jobs/503-acme-site-manager/',
|
||||
title: 'Site Manager',
|
||||
function: 'Engineering',
|
||||
locations: [
|
||||
'Houston',
|
||||
],
|
||||
workspace: 'Hybrid',
|
||||
experience: 'Experienced',
|
||||
employment_type: 'Full\u002Dtime',
|
||||
summary: 'Lead our Houston depot and its 40 drivers.',
|
||||
published_date: 'Sept. 25, 2026',
|
||||
},
|
||||
];
|
||||
</script></body></html>
|
||||
Vendored
+36
@@ -0,0 +1,36 @@
|
||||
[
|
||||
{
|
||||
"id": "l1",
|
||||
"text": "Data Scientist",
|
||||
"hostedUrl": "https://lever.example/l1",
|
||||
"createdAt": 1789430400000,
|
||||
"categories": {
|
||||
"location": "London",
|
||||
"department": "Data",
|
||||
"commitment": "Full-time",
|
||||
"allLocations": [
|
||||
"London",
|
||||
"Stockholm"
|
||||
]
|
||||
},
|
||||
"country": "GB",
|
||||
"workplaceType": "hybrid",
|
||||
"description": "<p>Data.</p>"
|
||||
},
|
||||
{
|
||||
"id": "l2",
|
||||
"text": "Designer",
|
||||
"hostedUrl": "https://lever.example/l2",
|
||||
"createdAt": 1789430400000,
|
||||
"categories": {
|
||||
"location": "Berlin",
|
||||
"commitment": "Permanent",
|
||||
"allLocations": [
|
||||
"Berlin"
|
||||
]
|
||||
},
|
||||
"country": "DE",
|
||||
"workplaceType": "on-site",
|
||||
"description": ""
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,44 @@
|
||||
"""The Ashby host module's places, work arrangement and employment, against a
|
||||
small saved board. No network. The pay and the shape of a plain row are in
|
||||
`test_ats.py`."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
if str(ROOT) not in sys.path:
|
||||
sys.path.insert(0, str(ROOT))
|
||||
|
||||
from plugins.readers import Ask, ashby # noqa: E402
|
||||
|
||||
BOARD = (ROOT / "tests" / "fixtures" / "ats" / "ashby-places.json").read_bytes()
|
||||
|
||||
|
||||
def test_the_primary_and_every_secondary_location_are_places() -> None:
|
||||
first, second = ashby.parse(BOARD, "acme")
|
||||
assert first["places"] == [{"text": "San Francisco", "remote": False},
|
||||
{"text": "London, UK", "remote": None},
|
||||
{"text": "Remote - US", "remote": True}]
|
||||
assert first["location"] == "San Francisco; London, UK; Remote - US"
|
||||
assert second["places"] == [{"text": "Dublin", "remote": True}]
|
||||
|
||||
|
||||
def test_a_hybrid_role_is_not_remote_although_the_host_flags_it() -> None:
|
||||
first, second = ashby.parse(BOARD, "acme")
|
||||
assert first["remote"] == "hybrid" and second["remote"] == "remote"
|
||||
|
||||
|
||||
def test_the_employment_type_is_mapped() -> None:
|
||||
first, second = ashby.parse(BOARD, "acme")
|
||||
assert (first["employment"], second["employment"]) == ("full_time", "contract")
|
||||
|
||||
|
||||
def test_it_declares_a_whole_listing_of_trusted_dates_and_no_robots_check() -> None:
|
||||
reads = ashby.READS
|
||||
assert (reads.listing, reads.text, reads.places, reads.empty) == (
|
||||
"whole", "listing", "many", "suspect")
|
||||
assert reads.fields.posted == "trusted" and reads.fields.pay == "figures"
|
||||
assert reads.robots == "api: no robots.txt check needed (public board API), 2026-09-30"
|
||||
assert ashby.feed_url("acme", Ask()).endswith("/job-board/acme?includeCompensation=true")
|
||||
+33
-27
@@ -9,7 +9,6 @@ from datetime import UTC, datetime
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
import httpx
|
||||
import pytest
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
@@ -18,7 +17,7 @@ if str(ROOT) not in sys.path:
|
||||
|
||||
from app.jobs import discover # noqa: E402
|
||||
from plugins import ats, readers # noqa: E402
|
||||
from plugins.readers import bamboohr # noqa: E402
|
||||
from plugins.readers import Ask, bamboohr # noqa: E402
|
||||
|
||||
FIXTURES = ROOT / "tests" / "fixtures" / "ats"
|
||||
|
||||
@@ -99,9 +98,10 @@ def test_detail_reads_the_text_the_date_and_the_country() -> None:
|
||||
found = bamboohr.detail(_get_of({url: _read("bamboohr-detail-37.json")}, asked),
|
||||
"configit", row)
|
||||
assert asked == [(url, {"Accept": "application/json"})]
|
||||
assert set(found) <= set(ats.DETAIL_FIELDS)
|
||||
assert set(found) <= set(ats.DETAIL_FIELDS) | {"places"}
|
||||
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"
|
||||
text = found["description"]
|
||||
assert text.startswith("Our Global Marketing Team is looking for")
|
||||
@@ -125,38 +125,44 @@ def test_detail_refuses_an_answer_that_is_not_a_role() -> None:
|
||||
bamboohr.detail(_get_of({url: body}, []), "configit", row)
|
||||
|
||||
|
||||
def test_the_board_and_its_details_are_read_through_the_app(
|
||||
monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
monkeypatch.setattr(ats, "PAGE_DELAY", 0)
|
||||
def test_the_board_and_its_details_are_read_with_the_json_accept_on_the_detail() -> None:
|
||||
base = "https://configit.bamboohr.com/careers"
|
||||
seen: list[str] = []
|
||||
asked: list[tuple[str, Any]] = []
|
||||
answers: dict[str, bytes | Exception] = {
|
||||
f"{base}/list": _read("bamboohr.json"),
|
||||
f"{base}/37/detail": _read("bamboohr-detail-37.json")}
|
||||
get = _get_of(answers, asked)
|
||||
rows = bamboohr.parse(get(bamboohr.feed_url("configit", Ask())), "configit")
|
||||
assert len(rows) == 2
|
||||
found = bamboohr.detail(get, "configit", rows[1])
|
||||
assert [url for url, _ in asked] == [f"{base}/list", f"{base}/37/detail"]
|
||||
assert asked[1][1] == {"Accept": "application/json"}
|
||||
assert found["location"] == "København Ø, Denmark"
|
||||
assert found["posted"] == datetime(2026, 9, 23, tzinfo=UTC)
|
||||
|
||||
def handler(request: httpx.Request) -> httpx.Response:
|
||||
seen.append(str(request.url))
|
||||
if request.url.path == "/careers/list":
|
||||
return httpx.Response(200, content=_read("bamboohr.json"))
|
||||
if request.url.path == "/careers/26/detail":
|
||||
return httpx.Response(404)
|
||||
assert request.headers["accept"] == "application/json"
|
||||
return httpx.Response(200, content=_read("bamboohr-detail-37.json"))
|
||||
|
||||
with httpx.Client(transport=httpx.MockTransport(handler)) as client:
|
||||
rows, complete = ats._fetch_rows(client, "bamboohr:configit")
|
||||
assert complete and len(rows) == 2 and seen == [f"{base}/list"]
|
||||
filled, done, failed = ats._read_details(client, "bamboohr:configit", rows, complete,
|
||||
set(), set())
|
||||
assert seen[1:] == [f"{base}/26/detail", f"{base}/37/detail"]
|
||||
# A 404 counts as read; the other role is filled from its own page.
|
||||
assert done == {"bamboohr:configit:26", "bamboohr:configit:37"} and failed == set()
|
||||
assert filled[0]["description"] == "" and filled[1]["location"] == "København Ø, Denmark"
|
||||
assert filled[1]["posted"] == datetime(2026, 9, 23, tzinfo=UTC)
|
||||
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"
|
||||
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
|
||||
|
||||
|
||||
def test_it_declares_what_it_reads() -> None:
|
||||
reads = bamboohr.READS
|
||||
assert (reads.listing, reads.text, reads.places, reads.fields.posted) == (
|
||||
"whole", "detail", "one", "trusted")
|
||||
assert reads.robots.startswith("read: robots.txt allows /careers")
|
||||
assert not hasattr(bamboohr, "robots_page")
|
||||
|
||||
|
||||
def test_the_slug_the_urls_and_the_allow_list() -> None:
|
||||
assert bamboohr.slug_ok("configit") and bamboohr.slug_ok("Configit")
|
||||
assert bamboohr.careers_url("configit") == "https://configit.bamboohr.com/careers"
|
||||
assert bamboohr.robots_page("configit") == "https://configit.bamboohr.com/careers"
|
||||
assert bamboohr.feed_url("Configit") == "https://configit.bamboohr.com/careers/list"
|
||||
assert bamboohr.feed_url("Configit", Ask()) == "https://configit.bamboohr.com/careers/list"
|
||||
allow = bamboohr.allowed("Configit")
|
||||
assert allow("configit.bamboohr.com") and allow("CONFIGIT.bamboohr.com")
|
||||
assert not allow("bamboohr.com") and not allow("other.bamboohr.com")
|
||||
|
||||
+22
-30
@@ -17,7 +17,7 @@ if str(ROOT) not in sys.path:
|
||||
|
||||
from app.jobs.discover import boards_in # noqa: E402
|
||||
from plugins import ats, readers # noqa: E402
|
||||
from plugins.readers import deel # noqa: E402
|
||||
from plugins.readers import Ask, deel # noqa: E402
|
||||
|
||||
PAGE = (ROOT / "tests" / "fixtures" / "ats" / "deel.html").read_bytes()
|
||||
URL = "https://jobs.deel.com/klarna"
|
||||
@@ -46,6 +46,13 @@ def test_several_locations_are_joined_and_remote_uses_the_stores_words() -> None
|
||||
assert rows["a8be45ac"]["location"] == "Stockholm; London; Milan; Warsaw"
|
||||
assert rows["f96bb9d4"]["remote"] == "remote"
|
||||
assert rows["f96bb9d4"]["location"] == "Ohio"
|
||||
# Every place is kept, in the host's order; the work arrangement is the
|
||||
# places' remote flag.
|
||||
assert rows["a8be45ac"]["places"] == [
|
||||
{"text": name, "remote": False} for name in ("Stockholm", "London", "Milan", "Warsaw")]
|
||||
assert rows["f96bb9d4"]["places"] == [{"text": "Ohio", "remote": True}]
|
||||
assert rows["f96bb9d4"]["employment"] == "contract" # "Consultant"
|
||||
assert rows["21584046"]["employment"] == "full_time"
|
||||
|
||||
|
||||
def test_pay_is_only_text_since_the_period_is_not_stated() -> None:
|
||||
@@ -90,37 +97,23 @@ def test_a_posting_without_a_title_or_id_is_skipped() -> None:
|
||||
|
||||
# ------------------------------------------------------------ the fetch
|
||||
|
||||
@pytest.fixture
|
||||
def web(monkeypatch: pytest.MonkeyPatch) -> dict[str, Any]:
|
||||
answers: dict[str, Any] = {}
|
||||
def test_the_board_is_one_request() -> None:
|
||||
asked: list[str] = []
|
||||
|
||||
def fake_get(client, url, host, slug, *, method="GET", payload=None, headers=None,
|
||||
www_twin=False):
|
||||
def get(url: str, **kwargs: Any) -> bytes:
|
||||
asked.append(url)
|
||||
if not ats._allowed_host(host, slug)(httpx.URL(url).host):
|
||||
raise ats._Refused(url)
|
||||
answer = answers[url]
|
||||
if isinstance(answer, BaseException):
|
||||
raise answer
|
||||
return answer
|
||||
return PAGE
|
||||
|
||||
monkeypatch.setattr(ats, "_get", fake_get)
|
||||
return {"answers": answers, "asked": asked}
|
||||
rows = deel.parse(get(deel.feed_url("klarna", Ask())), "klarna")
|
||||
assert len(rows) == 5 and asked == [URL]
|
||||
|
||||
|
||||
def test_the_board_is_one_request_and_complete(web: dict[str, Any]) -> None:
|
||||
web["answers"][URL] = PAGE
|
||||
with httpx.Client() as client:
|
||||
rows, complete = ats._fetch_rows(client, "deel:klarna")
|
||||
assert len(rows) == 5 and complete
|
||||
assert web["asked"] == [URL]
|
||||
|
||||
|
||||
def test_a_page_that_cannot_be_read_fails_the_board(web: dict[str, Any]) -> None:
|
||||
web["answers"][URL] = b"<html>Job Board Not Found</html>"
|
||||
with httpx.Client() as client, pytest.raises(ValueError):
|
||||
ats._fetch_rows(client, "deel:klarna")
|
||||
def test_it_declares_a_whole_listing_read_from_the_page() -> None:
|
||||
reads = deel.READS
|
||||
assert (reads.listing, reads.text, reads.places, reads.complete) == (
|
||||
"whole", "listing", "many", "whole")
|
||||
assert reads.fields.pay == "line" and "/api/ is disallowed and not read" in reads.robots
|
||||
assert not hasattr(deel, "robots_page")
|
||||
|
||||
|
||||
# ------------------------------------------------------- slugs and hosts
|
||||
@@ -131,10 +124,9 @@ def test_the_module_is_registered_as_a_feed_host() -> None:
|
||||
assert not hasattr(deel, "page") and not hasattr(deel, "detail")
|
||||
|
||||
|
||||
def test_the_urls_and_the_robots_page_are_the_boards_own() -> None:
|
||||
def test_the_urls_are_the_boards_own() -> None:
|
||||
assert deel.careers_url("klarna") == URL
|
||||
assert deel.feed_url("klarna") == URL
|
||||
assert deel.robots_page("klarna") == URL
|
||||
assert deel.feed_url("klarna", Ask()) == URL
|
||||
assert deel.allowed("klarna")("jobs.deel.com") and deel.allowed("klarna")("JOBS.DEEL.COM")
|
||||
for host in ("deel.com", "api.deel.com", "jobs.deel.com.evil.example", "evil.example"):
|
||||
assert not deel.allowed("klarna")(host)
|
||||
@@ -159,7 +151,7 @@ def test_no_slug_reaches_another_host() -> None:
|
||||
"""The host is fixed in every URL the module builds; a slug only ever
|
||||
lands in the path."""
|
||||
for slug in ("klarna", "Klarna", "a-b_c"):
|
||||
for url in (deel.careers_url(slug), deel.feed_url(slug), deel.robots_page(slug)):
|
||||
for url in (deel.careers_url(slug), deel.feed_url(slug, Ask())):
|
||||
assert httpx.URL(url).host == "jobs.deel.com"
|
||||
|
||||
|
||||
|
||||
+41
-23
@@ -18,7 +18,7 @@ if str(ROOT) not in sys.path:
|
||||
|
||||
from app.jobs import discover # noqa: E402
|
||||
from plugins import ats, readers # noqa: E402
|
||||
from plugins.readers import eightfold # noqa: E402
|
||||
from plugins.readers import Ask, eightfold # noqa: E402
|
||||
|
||||
FIXTURES = ROOT / "tests" / "fixtures" / "ats"
|
||||
SLUG = "jobs.ericsson.com/ericsson.com"
|
||||
@@ -47,6 +47,26 @@ def _search(total: int, seen: list[str] | None = None) -> httpx.MockTransport:
|
||||
return httpx.MockTransport(handler)
|
||||
|
||||
|
||||
def _crawl(slug: str, transport: httpx.MockTransport) -> tuple[list[dict[str, Any]], bool]:
|
||||
"""What the runner does with a paged reader: pages until the cursor ends,
|
||||
complete when as many distinct ids were read as the host stated."""
|
||||
rows: list[dict[str, Any]] = []
|
||||
ids: set[str] = set()
|
||||
total: Any = None
|
||||
with httpx.Client(transport=transport) as client:
|
||||
def get(url: str, **_: Any) -> bytes:
|
||||
return client.get(url).content
|
||||
|
||||
cursor: Any = None
|
||||
while True:
|
||||
decoded, results, total, cursor = eightfold.page(get, slug, cursor, Ask())
|
||||
rows += eightfold.rows(decoded, slug)
|
||||
ids |= {r["id"] for r in results}
|
||||
if cursor is None or (total is not None and len(ids) >= total):
|
||||
break
|
||||
return rows, total is not None and len(ids) >= total
|
||||
|
||||
|
||||
def test_a_page_becomes_rows() -> None:
|
||||
rows = eightfold.rows(_saved()["data"]["positions"], SLUG)
|
||||
assert len(rows) == 5
|
||||
@@ -56,11 +76,14 @@ def test_a_page_becomes_rows() -> None:
|
||||
assert first["url"] == "https://jobs.ericsson.com/careers/job/563121777024688"
|
||||
assert first["location"] == "Stockholm, Sweden" # the city is its own region
|
||||
assert first["department"] == "76 Product Development"
|
||||
assert first["posted"] == datetime.fromtimestamp(1790703782, tz=UTC)
|
||||
# `creationTs`, the posting date; `postedTs` (1790703782) is refreshed in bulk.
|
||||
assert first["posted"] == datetime.fromtimestamp(1785822052, tz=UTC)
|
||||
assert first["places"] == [{"text": "Stockholm, Sweden", "remote": None}]
|
||||
assert first["remote"] == "onsite" and (first["description"], first["salary_text"]) == ("", "")
|
||||
assert mexico["location"] == "Mexico City, Mexico"
|
||||
assert many["location"] == ("Tecnoparque, Mexico City, Mexico; Santa Fe, Mexico City, Mexico; "
|
||||
"Mexico City, Mexico; Tlalnepantla, Estado de México, Mexico")
|
||||
assert [p["text"] for p in many["places"]] == many["location"].split("; ")
|
||||
|
||||
|
||||
@pytest.mark.parametrize(("option", "remote"), [
|
||||
@@ -89,36 +112,23 @@ def test_a_page_asks_for_the_newest_first_from_its_offset() -> None:
|
||||
asked.append(url)
|
||||
return json.dumps(_saved()).encode()
|
||||
|
||||
decoded, results, total, cursor = eightfold.page(get, SLUG, None)
|
||||
decoded, results, total, cursor = eightfold.page(get, SLUG, None, Ask())
|
||||
assert asked == ["https://jobs.ericsson.com/api/pcsx/search?domain=ericsson.com"
|
||||
"&sort_by=timestamp&start=0"]
|
||||
assert (len(decoded), len(results), total, cursor) == (5, 5, 637, 5)
|
||||
assert eightfold.page(get, SLUG, 630)[3] == 635
|
||||
assert eightfold.page(get, SLUG, 630, Ask())[3] == 635
|
||||
assert asked[-1].endswith("&start=630")
|
||||
|
||||
|
||||
def test_a_board_is_read_ten_at_a_time_to_its_total(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
monkeypatch.setattr(ats, "PAGE_DELAY", 0)
|
||||
def test_a_board_is_read_ten_at_a_time_to_its_total() -> None:
|
||||
seen: list[str] = []
|
||||
with httpx.Client(transport=_search(25, seen)) as client:
|
||||
rows, complete = ats._fetch_rows(client, f"eightfold:{SLUG}")
|
||||
rows, complete = _crawl(SLUG, _search(25, seen))
|
||||
assert (len(rows), complete) == (25, True)
|
||||
assert [u.rsplit("=", 1)[1] for u in seen] == ["0", "10", "20"]
|
||||
|
||||
|
||||
def test_a_board_over_the_page_cap_is_incomplete(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
"""The cap is 100 pages of ten: a board of 1,292 (Infineon's) or 2,319
|
||||
(Microsoft's) is read as its first thousand and never as the whole."""
|
||||
monkeypatch.setattr(ats, "PAGE_DELAY", 0)
|
||||
seen: list[str] = []
|
||||
with httpx.Client(transport=_search(1292, seen)) as client:
|
||||
rows, complete = ats._fetch_rows(client, "eightfold:infineon.eightfold.ai/infineon.com")
|
||||
assert (len(rows), complete) == (1000, False) and len(seen) == ats.MAX_PAGES == 100
|
||||
|
||||
|
||||
def test_an_empty_board_is_complete_at_zero(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
with httpx.Client(transport=_search(0)) as client:
|
||||
assert ats._fetch_rows(client, f"eightfold:{SLUG}") == ([], True)
|
||||
def test_an_empty_board_is_complete_at_zero() -> None:
|
||||
assert _crawl(SLUG, _search(0)) == ([], True)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("body", [
|
||||
@@ -126,7 +136,7 @@ def test_an_empty_board_is_complete_at_zero(monkeypatch: pytest.MonkeyPatch) ->
|
||||
b'{"data": {"positions": null}}'])
|
||||
def test_an_answer_that_is_not_a_search_raises(body: bytes) -> None:
|
||||
with pytest.raises(ValueError):
|
||||
eightfold.page(lambda url, **_: body, SLUG, None)
|
||||
eightfold.page(lambda url, **_: body, SLUG, None, Ask())
|
||||
|
||||
|
||||
def test_detail_reads_the_text_of_the_ad() -> None:
|
||||
@@ -164,7 +174,6 @@ def test_the_slug_the_urls_and_the_allow_list() -> None:
|
||||
for slug in (SLUG, "infineon.eightfold.ai/infineon.com", "Apply.Careers.Microsoft.com/microsoft.com"):
|
||||
assert eightfold.slug_ok(slug) and ats.is_known_target(f"eightfold:{slug}")
|
||||
assert eightfold.careers_url("Jobs.Ericsson.com/ericsson.com") == "https://jobs.ericsson.com/careers"
|
||||
assert eightfold.robots_page(SLUG) == "https://jobs.ericsson.com/careers"
|
||||
allow = eightfold.allowed("Jobs.Ericsson.com/ericsson.com")
|
||||
assert allow("jobs.ericsson.com") and allow("JOBS.ERICSSON.COM")
|
||||
assert not allow("ericsson.com") and not allow("evil.example")
|
||||
@@ -193,3 +202,12 @@ def test_discovery_reads_the_host_and_domain_from_a_link_that_has_both() -> None
|
||||
assert ("eightfold", "infineon.eightfold.ai/infineon.com") in found
|
||||
assert ("eightfold", "") in found
|
||||
assert "eightfold" not in {h for h, _ in discover._UNREADABLE if h not in readers.HOSTS}
|
||||
|
||||
|
||||
def test_it_declares_a_paged_read_of_ten_with_a_total_and_no_filter_yet() -> None:
|
||||
reads = eightfold.READS
|
||||
assert (reads.listing, reads.page_size, reads.text, reads.complete, reads.places) == (
|
||||
"paged", 10, "detail", "stated", "many")
|
||||
assert reads.filters.declared() == {} and reads.fields.posted == "listed"
|
||||
assert reads.robots.startswith("read: robots.txt allows /careers")
|
||||
assert not hasattr(eightfold, "robots_page")
|
||||
+27
-25
@@ -3,13 +3,11 @@ answers. No network."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import sys
|
||||
from datetime import UTC, datetime
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
import httpx
|
||||
import pytest
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
@@ -18,7 +16,7 @@ if str(ROOT) not in sys.path:
|
||||
|
||||
from app.jobs import discover # noqa: E402
|
||||
from plugins import ats, readers # noqa: E402
|
||||
from plugins.readers import gem # noqa: E402
|
||||
from plugins.readers import Ask, gem # noqa: E402
|
||||
|
||||
FIXTURES = ROOT / "tests" / "fixtures" / "ats"
|
||||
API = "https://jobs.gem.com/api/public/graphql"
|
||||
@@ -47,7 +45,7 @@ def _listing() -> dict[str, bytes | Exception]:
|
||||
|
||||
def test_a_listing_becomes_rows() -> None:
|
||||
asked: list[dict[str, Any]] = []
|
||||
decoded, results, total, cursor = gem.page(_get_of(_listing(), asked), "productboard", None)
|
||||
decoded, results, total, cursor = gem.page(_get_of(_listing(), asked), "productboard", None, Ask())
|
||||
assert asked == [{"operationName": "JobBoardList", "variables": {"boardId": "productboard"},
|
||||
"query": gem.LIST_QUERY, "headers": None}]
|
||||
assert (total, cursor) == (None, None) and len(results) == 11
|
||||
@@ -62,6 +60,11 @@ def test_a_listing_becomes_rows() -> None:
|
||||
assert (first["posted"], first["description"], first["salary_text"]) == (None, "", "")
|
||||
assert backend["source_id"] == "am9icG9zdDqWC1V_RM7U6ORvTd1Iu64r" # opaque
|
||||
assert backend["location"] == "Prague; Remote Europe; Brno"
|
||||
# Every place is kept, and the host's own flag says which is remote.
|
||||
assert backend["places"] == [{"text": "Prague", "remote": False},
|
||||
{"text": "Remote Europe", "remote": True},
|
||||
{"text": "Brno", "remote": False}]
|
||||
assert first["employment"] == "full_time"
|
||||
assert len({r["source_id"] for r in rows}) == 11
|
||||
|
||||
|
||||
@@ -80,28 +83,28 @@ def test_a_posting_without_a_title_or_an_ext_id_is_left_out() -> None:
|
||||
assert gem.rows([{"extId": "1", "title": " "}, {"extId": "", "title": "Role"}], "acme") == []
|
||||
|
||||
|
||||
def test_the_board_is_read_through_the_app_without_origin_or_referer() -> None:
|
||||
seen: list[httpx.Request] = []
|
||||
|
||||
def handler(request: httpx.Request) -> httpx.Response:
|
||||
seen.append(request)
|
||||
return httpx.Response(200, content=_read("gem.json"))
|
||||
|
||||
with httpx.Client(transport=httpx.MockTransport(handler)) as client:
|
||||
rows, complete = ats._fetch_rows(client, "gem:productboard")
|
||||
assert len(rows) == 11 and complete
|
||||
(request,) = seen
|
||||
assert str(request.url) == API and request.method == "POST"
|
||||
assert json.loads(request.content)["variables"] == {"boardId": "productboard"}
|
||||
assert "origin" not in request.headers and "referer" not in request.headers
|
||||
assert request.headers["content-type"] == "application/json"
|
||||
def test_the_board_is_one_post_without_origin_or_referer() -> None:
|
||||
asked: list[dict[str, Any]] = []
|
||||
decoded, _results, total, cursor = gem.page(_get_of(_listing(), asked), "productboard",
|
||||
None, Ask())
|
||||
(call,) = asked
|
||||
assert call["variables"] == {"boardId": "productboard"} and call["headers"] is None
|
||||
assert len(gem.rows(decoded, "productboard")) == 11 and (total, cursor) == (None, None)
|
||||
|
||||
|
||||
def test_an_empty_board_is_complete_at_zero() -> None:
|
||||
def test_an_empty_board_is_no_rows() -> None:
|
||||
body = b'{"data":{"oatsExternalJobPostings":{"jobPostings":[]}}}'
|
||||
with httpx.Client(transport=httpx.MockTransport(
|
||||
lambda request: httpx.Response(200, content=body))) as client:
|
||||
assert ats._fetch_rows(client, "gem:nobody") == ([], True)
|
||||
decoded, results, _total, cursor = gem.page(
|
||||
_get_of({"JobBoardList": body}, []), "nobody", None, Ask())
|
||||
assert gem.rows(decoded, "nobody") == [] and results == [] and cursor is None
|
||||
|
||||
|
||||
def test_it_declares_one_page_that_may_be_empty_by_mistake() -> None:
|
||||
reads = gem.READS
|
||||
assert (reads.listing, reads.text, reads.places, reads.empty) == (
|
||||
"paged", "detail", "many", "suspect")
|
||||
assert reads.robots.startswith("read: robots.txt allows /<board>")
|
||||
assert not hasattr(gem, "robots_page")
|
||||
|
||||
|
||||
@pytest.mark.parametrize(("body", "message"), [
|
||||
@@ -114,7 +117,7 @@ def test_an_empty_board_is_complete_at_zero() -> None:
|
||||
])
|
||||
def test_an_answer_of_another_shape_fails_with_a_clear_error(body: bytes, message: str) -> None:
|
||||
with pytest.raises(ValueError, match=message):
|
||||
gem.page(_get_of({"JobBoardList": body}, []), "productboard", None)
|
||||
gem.page(_get_of({"JobBoardList": body}, []), "productboard", None, Ask())
|
||||
|
||||
|
||||
def test_detail_reads_the_text_and_the_date() -> None:
|
||||
@@ -149,7 +152,6 @@ def test_the_slug_the_urls_and_the_allow_list() -> None:
|
||||
for slug in ("productboard", "Productboard", "senndertechnologies-gmbh", "a_b", "1"):
|
||||
assert gem.slug_ok(slug)
|
||||
assert gem.careers_url("Productboard") == "https://jobs.gem.com/Productboard"
|
||||
assert gem.robots_page("productboard") == "https://jobs.gem.com/productboard"
|
||||
allow = gem.allowed("productboard")
|
||||
assert allow("jobs.gem.com") and allow("JOBS.gem.com")
|
||||
assert not allow("gem.com") and not allow("productboard.gem.com")
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
"""The Greenhouse host module's places, against a small saved board with
|
||||
`offices`. No network. The pay and the plain row are in `test_ats.py`."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
if str(ROOT) not in sys.path:
|
||||
sys.path.insert(0, str(ROOT))
|
||||
|
||||
from plugins.readers import Ask, greenhouse # noqa: E402
|
||||
|
||||
BOARD = (ROOT / "tests" / "fixtures" / "ats" / "greenhouse-places.json").read_bytes()
|
||||
|
||||
|
||||
def test_a_placeholder_location_is_replaced_by_the_offices() -> None:
|
||||
hybrid = greenhouse.parse(BOARD, "acme")[0]
|
||||
assert hybrid["places"] == [
|
||||
{"text": "Austin, TX, United States", "remote": None},
|
||||
{"text": "New York, New York, United States", "remote": None}]
|
||||
assert hybrid["location"] == "Austin, TX, United States; New York, New York, United States"
|
||||
|
||||
|
||||
def test_a_name_the_offices_do_not_contain_is_one_more_place() -> None:
|
||||
remote = greenhouse.parse(BOARD, "acme")[1]
|
||||
assert [p["text"] for p in remote["places"]] == ["Remote India", "Bangalore, India"]
|
||||
assert remote["places"][0]["remote"] is True
|
||||
|
||||
|
||||
def test_a_name_an_office_repeats_is_one_place() -> None:
|
||||
lisbon = greenhouse.parse(BOARD, "acme")[2]
|
||||
assert lisbon["places"] == [{"text": "Lisbon, Portugal", "remote": None}]
|
||||
|
||||
|
||||
def test_without_offices_the_name_is_the_place() -> None:
|
||||
body = b'{"jobs": [{"id": 1, "title": "T", "absolute_url": "https://gh.example/1", ' \
|
||||
b'"location": {"name": "Hybrid"}}, {"id": 2, "title": "U", ' \
|
||||
b'"absolute_url": "https://gh.example/2", "location": {"name": ""}}]}'
|
||||
hybrid, nothing = greenhouse.parse(body, "acme")
|
||||
assert hybrid["places"] == [{"text": "Hybrid", "remote": None}]
|
||||
assert nothing["places"] == [] and nothing["location"] == ""
|
||||
|
||||
|
||||
def test_it_declares_a_whole_listing_of_trusted_dates_and_no_robots_check() -> None:
|
||||
reads = greenhouse.READS
|
||||
assert (reads.listing, reads.text, reads.places) == ("whole", "listing", "many")
|
||||
assert reads.fields.posted == "trusted" and reads.fields.pay == "figures"
|
||||
assert reads.robots == "api: no robots.txt check needed (public board API), 2026-09-30"
|
||||
assert greenhouse.feed_url("acme", Ask()).endswith("/boards/acme/jobs?content=true&pay_transparency=true")
|
||||
assert greenhouse.fallback_url("acme").endswith("/boards/acme/jobs")
|
||||
+45
-34
@@ -17,7 +17,7 @@ if str(ROOT) not in sys.path:
|
||||
|
||||
from app.jobs.discover import boards_in # noqa: E402
|
||||
from plugins import ats, readers # noqa: E402
|
||||
from plugins.readers import hibob # noqa: E402
|
||||
from plugins.readers import Ask, hibob # noqa: E402
|
||||
|
||||
FIXTURES = ROOT / "tests" / "fixtures" / "ats"
|
||||
BOARD = (FIXTURES / "hibob.json").read_bytes()
|
||||
@@ -104,7 +104,7 @@ def test_the_page_sends_the_company_header_and_states_no_total() -> None:
|
||||
seen.append((url, headers))
|
||||
return BOARD
|
||||
|
||||
data, results, total, cursor = hibob.page(get, "Liquidia", None)
|
||||
data, results, total, cursor = hibob.page(get, "Liquidia", None, Ask())
|
||||
assert seen == [(API, {"companyIdentifier": "liquidia", "Accept": "application/json"})]
|
||||
assert len(results) == 5 and all(r["id"] for r in results)
|
||||
assert total is None and cursor is None
|
||||
@@ -113,46 +113,58 @@ def test_the_page_sends_the_company_header_and_states_no_total() -> None:
|
||||
|
||||
def test_a_body_without_the_ads_is_not_a_board() -> None:
|
||||
with pytest.raises(ValueError, match="not a HiBob board"):
|
||||
hibob.page(lambda url, **kw: b'{"error": "unauthorized"}', "acme", None)
|
||||
hibob.page(lambda url, **kw: b'{"error": "unauthorized"}', "acme", None, Ask())
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def web(monkeypatch: pytest.MonkeyPatch) -> dict[str, Any]:
|
||||
answers: dict[str, Any] = {}
|
||||
def test_the_board_is_one_request_with_the_company_header() -> None:
|
||||
seen: list[tuple[str, dict[str, str] | None]] = []
|
||||
|
||||
def fake_get(client, url, host, slug, *, method="GET", payload=None, headers=None,
|
||||
www_twin=False):
|
||||
def get(url: str, *, method: str = "GET", payload: Any = None,
|
||||
headers: dict[str, str] | None = None) -> bytes:
|
||||
seen.append((url, headers))
|
||||
if not ats._allowed_host(host, slug)(httpx.URL(url).host):
|
||||
raise ats._Refused(url)
|
||||
answer = answers[url]
|
||||
if isinstance(answer, BaseException):
|
||||
raise answer
|
||||
return answer
|
||||
return BOARD
|
||||
|
||||
monkeypatch.setattr(ats, "_get", fake_get)
|
||||
return {"answers": answers, "seen": seen}
|
||||
data, _results, _total, cursor = hibob.page(get, "liquidia", None, Ask())
|
||||
assert len(hibob.rows(data, "liquidia")) == 5 and cursor is None
|
||||
assert [url for url, _ in seen] == [API]
|
||||
assert seen[0][1] is not None and seen[0][1]["companyIdentifier"] == "liquidia"
|
||||
|
||||
|
||||
def test_the_board_is_one_request_and_complete(web: dict[str, Any]) -> None:
|
||||
web["answers"][API] = BOARD
|
||||
with httpx.Client() as client:
|
||||
rows, complete = ats._fetch_rows(client, "hibob:liquidia")
|
||||
assert len(rows) == 5 and complete
|
||||
assert [url for url, _ in web["seen"]] == [API]
|
||||
assert web["seen"][0][1]["companyIdentifier"] == "liquidia"
|
||||
|
||||
|
||||
def test_an_empty_board_is_complete_and_a_401_is_a_failure(web: dict[str, Any]) -> None:
|
||||
web["answers"]["https://acme.careers.hibob.com/api/job-ad"] = b'{"jobAdDetails": []}'
|
||||
def test_an_empty_board_is_no_rows_and_a_401_reaches_the_caller() -> None:
|
||||
data, results, _total, _cursor = hibob.page(
|
||||
lambda url, **kw: b'{"jobAdDetails": []}', "acme", None, Ask())
|
||||
assert hibob.rows(data, "acme") == [] and results == []
|
||||
request = httpx.Request("GET", API)
|
||||
web["answers"][API] = httpx.HTTPStatusError(
|
||||
"401", request=request, response=httpx.Response(401, request=request))
|
||||
with httpx.Client() as client:
|
||||
assert ats._fetch_rows(client, "hibob:acme") == ([], True)
|
||||
with pytest.raises(httpx.HTTPStatusError):
|
||||
ats._fetch_rows(client, "hibob:liquidia")
|
||||
|
||||
def refused(url: str, **kw: Any) -> bytes:
|
||||
raise httpx.HTTPStatusError("401", request=request,
|
||||
response=httpx.Response(401, request=request))
|
||||
|
||||
with pytest.raises(httpx.HTTPStatusError):
|
||||
hibob.page(refused, "liquidia", None, Ask())
|
||||
|
||||
|
||||
def test_each_ad_names_one_site_and_the_host_lists_a_copy_per_site() -> None:
|
||||
dixa = hibob.parse(DIXA, "dixa")
|
||||
assert [r["places"] for r in dixa] == [
|
||||
[{"text": "Copenhagen, Denmark", "remote": False}],
|
||||
[{"text": "London, United Kingdom", "remote": False}]]
|
||||
assert {r["title"] for r in dixa} == {"Expression of interest"}
|
||||
assert len({r["source_id"] for r in dixa}) == 2
|
||||
|
||||
|
||||
def test_the_employment_type_is_mapped_and_a_permanent_one_is_left_unmapped() -> None:
|
||||
rows = hibob.parse(BOARD, "liquidia")
|
||||
assert rows[0]["employment"] == "full_time" # "Regular Full Time"
|
||||
assert "employment" not in hibob.parse(DIXA, "dixa")[0] # "Permanent"
|
||||
|
||||
|
||||
def test_it_declares_copies_with_a_page_and_a_robots_decision() -> None:
|
||||
reads = hibob.READS
|
||||
assert (reads.listing, reads.text, reads.places, reads.complete) == (
|
||||
"paged", "listing", "copies", "end")
|
||||
assert reads.robots.startswith("read: robots.txt allows")
|
||||
assert not hasattr(hibob, "robots_page")
|
||||
|
||||
|
||||
# ------------------------------------------------------- slugs and hosts
|
||||
@@ -165,7 +177,6 @@ def test_the_module_is_registered_as_a_paged_host() -> None:
|
||||
|
||||
def test_the_urls_and_the_allowed_host_follow_the_slug() -> None:
|
||||
assert hibob.careers_url("dixa") == "https://dixa.careers.hibob.com/"
|
||||
assert hibob.robots_page("dixa") == "https://dixa.careers.hibob.com/"
|
||||
allow = hibob.allowed("Dixa")
|
||||
assert allow("dixa.careers.hibob.com") and allow("DIXA.CAREERS.HIBOB.COM")
|
||||
for host in ("careers.hibob.com", "other.careers.hibob.com", "dixa.hibob.com",
|
||||
|
||||
+41
-48
@@ -16,7 +16,7 @@ if str(ROOT) not in sys.path:
|
||||
|
||||
from app.jobs.discover import boards_in # noqa: E402
|
||||
from plugins import ats, readers # noqa: E402
|
||||
from plugins.readers import hrmanager # noqa: E402
|
||||
from plugins.readers import Ask, hrmanager # noqa: E402
|
||||
|
||||
FIXTURES = ROOT / "tests" / "fixtures" / "ats"
|
||||
BOARD = (FIXTURES / "hrmanager.xml").read_bytes()
|
||||
@@ -73,64 +73,58 @@ def _paged(answers: dict[str, bytes], asked: list[str]) -> Any:
|
||||
def test_the_page_moves_on_by_what_it_returned_and_ends_on_an_empty_one() -> None:
|
||||
asked: list[str] = []
|
||||
get = _paged({_feed(0): BOARD, _feed(5): EMPTY}, asked)
|
||||
data, results, total, cursor = hrmanager.page(get, "stsgroup_tr", None)
|
||||
data, results, total, cursor = hrmanager.page(get, "stsgroup_tr", None, Ask())
|
||||
assert len(results) == 5 and total is None and cursor == 5
|
||||
assert len(hrmanager.rows(data, "stsgroup_tr")) == 5
|
||||
_, results, total, cursor = hrmanager.page(get, "stsgroup_tr", cursor)
|
||||
_, results, total, cursor = hrmanager.page(get, "stsgroup_tr", cursor, Ask())
|
||||
assert results == [] and total is None and cursor is None
|
||||
assert asked == [_feed(0), _feed(5)]
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def web(monkeypatch: pytest.MonkeyPatch) -> dict[str, Any]:
|
||||
answers: dict[str, Any] = {}
|
||||
def _crawl(get: Any, slug: str) -> list[dict[str, Any]]:
|
||||
"""Pages until the cursor ends, as the runner does, giving the rows."""
|
||||
out: list[dict[str, Any]] = []
|
||||
cursor: Any = None
|
||||
while True:
|
||||
data, _results, _total, cursor = hrmanager.page(get, slug, cursor, Ask())
|
||||
out += hrmanager.rows(data, slug)
|
||||
if cursor is None:
|
||||
return out
|
||||
|
||||
|
||||
def test_a_board_is_read_to_an_empty_page() -> None:
|
||||
asked: list[str] = []
|
||||
|
||||
def fake_get(client, url, host, slug, *, method="GET", payload=None, headers=None,
|
||||
www_twin=False):
|
||||
asked.append(url)
|
||||
if not ats._allowed_host(host, slug)(httpx.URL(url).host):
|
||||
raise ats._Refused(url)
|
||||
answer = answers[url]
|
||||
if isinstance(answer, BaseException):
|
||||
raise answer
|
||||
return answer
|
||||
|
||||
monkeypatch.setattr(ats, "_get", fake_get)
|
||||
monkeypatch.setattr(ats, "PAGE_DELAY", 0)
|
||||
return {"answers": answers, "asked": asked}
|
||||
rows = _crawl(_paged({_feed(0): BOARD, _feed(5): EMPTY}, asked), "stsgroup_tr")
|
||||
assert len(rows) == 5 and asked == [_feed(0), _feed(5)]
|
||||
|
||||
|
||||
def test_a_board_is_complete_when_the_read_ends_on_an_empty_page(web: dict[str, Any]) -> None:
|
||||
web["answers"] |= {_feed(0): BOARD, _feed(5): EMPTY}
|
||||
with httpx.Client() as client:
|
||||
rows, complete = ats._fetch_rows(client, "hrmanager:stsgroup_tr")
|
||||
assert len(rows) == 5 and complete
|
||||
assert web["asked"] == [_feed(0), _feed(5)]
|
||||
def test_a_board_with_no_roles_is_empty() -> None:
|
||||
asked: list[str] = []
|
||||
assert _crawl(_paged({_feed(0, "seaborg_tr"): EMPTY}, asked), "seaborg_tr") == []
|
||||
assert asked == [_feed(0, "seaborg_tr")]
|
||||
|
||||
|
||||
def test_a_board_with_no_roles_is_complete_and_empty(web: dict[str, Any]) -> None:
|
||||
web["answers"][_feed(0, "seaborg_tr")] = EMPTY
|
||||
with httpx.Client() as client:
|
||||
assert ats._fetch_rows(client, "hrmanager:seaborg_tr") == ([], True)
|
||||
assert web["asked"] == [_feed(0, "seaborg_tr")]
|
||||
|
||||
|
||||
def test_a_page_the_host_repeats_leaves_the_board_incomplete(web: dict[str, Any]) -> None:
|
||||
"""A host that ignored `skip` would answer the same roles again."""
|
||||
web["answers"] |= {_feed(0): BOARD, _feed(5): BOARD}
|
||||
with httpx.Client() as client:
|
||||
rows, complete = ats._fetch_rows(client, "hrmanager:stsgroup_tr")
|
||||
assert len(rows) == 5 and not complete
|
||||
|
||||
|
||||
def test_a_429_after_the_first_page_ends_the_read_incomplete(web: dict[str, Any]) -> None:
|
||||
def test_a_429_after_the_first_page_reaches_the_caller() -> None:
|
||||
request = httpx.Request("GET", _feed(5))
|
||||
web["answers"] |= {_feed(0): BOARD, _feed(5): httpx.HTTPStatusError(
|
||||
"429", request=request, response=httpx.Response(429, request=request))}
|
||||
with httpx.Client() as client:
|
||||
rows, complete = ats._fetch_rows(client, "hrmanager:stsgroup_tr")
|
||||
assert len(rows) == 5 and not complete
|
||||
|
||||
def get(url: str, **kwargs: Any) -> bytes:
|
||||
if url == _feed(5):
|
||||
raise httpx.HTTPStatusError("429", request=request,
|
||||
response=httpx.Response(429, request=request))
|
||||
return BOARD
|
||||
|
||||
with pytest.raises(httpx.HTTPStatusError):
|
||||
_crawl(get, "stsgroup_tr")
|
||||
|
||||
|
||||
def test_the_feed_states_no_place_and_the_robots_decision_is_the_owners() -> None:
|
||||
rows = hrmanager.parse(BOARD, "stsgroup_tr")
|
||||
assert all(r["places"] == [] for r in rows)
|
||||
reads = hrmanager.READS
|
||||
assert (reads.listing, reads.page_size, reads.text, reads.places) == (
|
||||
"paged", 100, "listing", "one")
|
||||
assert reads.robots == "disallowed by robots.txt; owner to decide"
|
||||
assert not hasattr(hrmanager, "robots_page")
|
||||
|
||||
|
||||
# ------------------------------------------------------- slugs and hosts
|
||||
@@ -144,7 +138,6 @@ def test_the_module_is_registered_as_a_paged_host() -> None:
|
||||
def test_the_urls_and_the_allowed_host() -> None:
|
||||
assert hrmanager.careers_url("seaborg_tr") == \
|
||||
"https://candidate.hr-manager.net/vacancies/list.aspx?customer=seaborg_tr"
|
||||
assert hrmanager.robots_page("stsgroup_tr") == _feed(0)
|
||||
allow = hrmanager.allowed("stsgroup_tr")
|
||||
assert allow("api.hr-manager.net") and allow("API.HR-MANAGER.NET")
|
||||
for host in ("candidate.hr-manager.net", "hr-manager.net", "api.hr-manager.net.evil.example",
|
||||
|
||||
+41
-27
@@ -18,7 +18,7 @@ if str(ROOT) not in sys.path:
|
||||
|
||||
from app.jobs import discover # noqa: E402
|
||||
from plugins import ats, readers # noqa: E402
|
||||
from plugins.readers import jibe # noqa: E402
|
||||
from plugins.readers import Ask, jibe # noqa: E402
|
||||
|
||||
FIXTURES = ROOT / "tests" / "fixtures" / "ats"
|
||||
SITE = "jobs.booking.com"
|
||||
@@ -52,6 +52,12 @@ def test_a_page_becomes_rows() -> None:
|
||||
assert first["posted"] == datetime(2026, 9, 29, 12, 55, tzinfo=UTC)
|
||||
assert (first["remote"], first["salary_text"]) == (None, "")
|
||||
assert several["location"] == "Amsterdam, Netherlands; Manchester, United Kingdom"
|
||||
# Every place the site lists is kept; a country only for a role at one place.
|
||||
assert [p["text"] for p in several["places"]] == ["Amsterdam, Netherlands",
|
||||
"Manchester, United Kingdom"]
|
||||
assert "country" not in several
|
||||
assert first["places"] == [{"text": "Bucharest, Romania", "remote": None}]
|
||||
assert (first["country"], first["employment"]) == ("RO", "full_time")
|
||||
assert all(r["description"] and "<" not in r["description"] and " " not in r["description"]
|
||||
for r in rows)
|
||||
|
||||
@@ -79,56 +85,57 @@ def test_a_page_states_its_total_and_the_cursor_is_the_next_number() -> None:
|
||||
asked.append(url)
|
||||
return json.dumps(board[int(url.rsplit("=", 1)[1])]).encode()
|
||||
|
||||
decoded, results, total, cursor = jibe.page(get, SITE, None)
|
||||
decoded, results, total, cursor = jibe.page(get, SITE, None, Ask())
|
||||
assert asked == ["https://jobs.booking.com/api/jobs?limit=100&page=1"]
|
||||
assert (len(results), total, cursor) == (100, 145, 2)
|
||||
assert len(jibe.rows(decoded, SITE)) == 100
|
||||
assert jibe.page(get, SITE, 2)[2:] == (145, 3)
|
||||
assert jibe.page(get, SITE, 2, Ask())[2:] == (145, 3)
|
||||
assert asked[-1].endswith("&page=2")
|
||||
|
||||
|
||||
def test_the_board_is_read_to_its_total_through_the_app(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
monkeypatch.setattr(ats, "PAGE_DELAY", 0)
|
||||
board = _board(145)
|
||||
def _crawl(board: dict[int, dict[str, Any]]) -> tuple[list[dict[str, Any]], bool, list[str]]:
|
||||
"""Pages as the runner does: on to the next number until the cursor ends
|
||||
or as many distinct ids were read as the total; complete in the latter."""
|
||||
seen: list[str] = []
|
||||
|
||||
def handler(request: httpx.Request) -> httpx.Response:
|
||||
seen.append(str(request.url))
|
||||
return httpx.Response(200, json=board[int(request.url.params["page"])])
|
||||
def get(url: str, **_: Any) -> bytes:
|
||||
seen.append(url)
|
||||
return json.dumps(board[int(url.rsplit("=", 1)[1])]).encode()
|
||||
|
||||
with httpx.Client(transport=httpx.MockTransport(handler)) as client:
|
||||
rows, complete = ats._fetch_rows(client, f"jibe:{SITE}")
|
||||
rows: list[dict[str, Any]] = []
|
||||
ids: set[str] = set()
|
||||
cursor: Any = None
|
||||
while True:
|
||||
decoded, results, total, cursor = jibe.page(get, SITE, cursor, Ask())
|
||||
rows += jibe.rows(decoded, SITE)
|
||||
ids |= {r["id"] for r in results}
|
||||
if cursor is None or (total is not None and len(ids) >= total):
|
||||
return rows, total is not None and len(ids) >= total, seen
|
||||
|
||||
|
||||
def test_the_board_is_read_to_its_total() -> None:
|
||||
rows, complete, seen = _crawl(_board(145))
|
||||
assert (len(rows), complete) == (145, True)
|
||||
assert seen == [f"https://jobs.booking.com/api/jobs?limit=100&page={n}" for n in (1, 2)]
|
||||
|
||||
|
||||
def test_a_board_that_ends_short_of_its_total_is_incomplete(
|
||||
monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
monkeypatch.setattr(ats, "PAGE_DELAY", 0)
|
||||
def test_a_board_that_ends_short_of_its_total_is_incomplete() -> None:
|
||||
board = _board(145)
|
||||
board[2]["totalCount"] = board[1]["totalCount"] = 150 # five roles the site never sends
|
||||
board[3] = {"jobs": [], "totalCount": 150}
|
||||
|
||||
def handler(request: httpx.Request) -> httpx.Response:
|
||||
return httpx.Response(200, json=board[int(request.url.params["page"])])
|
||||
|
||||
with httpx.Client(transport=httpx.MockTransport(handler)) as client:
|
||||
rows, complete = ats._fetch_rows(client, f"jibe:{SITE}")
|
||||
rows, complete, _seen = _crawl(board)
|
||||
assert (len(rows), complete) == (145, False)
|
||||
|
||||
|
||||
def test_an_empty_board_is_complete_at_zero() -> None:
|
||||
body = {"jobs": [], "totalCount": 0}
|
||||
with httpx.Client(transport=httpx.MockTransport(
|
||||
lambda request: httpx.Response(200, json=body))) as client:
|
||||
assert ats._fetch_rows(client, f"jibe:{SITE}") == ([], True)
|
||||
assert _crawl({1: {"jobs": [], "totalCount": 0}})[:2] == ([], True)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("body", [b"<html>Not found</html>", b"[]", b'{"jobs": null}',
|
||||
b'{"error": "no"}'])
|
||||
def test_an_answer_that_is_not_a_listing_raises(body: bytes) -> None:
|
||||
with pytest.raises(ValueError):
|
||||
jibe.page(lambda url, **_: body, SITE, None)
|
||||
jibe.page(lambda url, **_: body, SITE, None, Ask())
|
||||
|
||||
|
||||
def test_a_422_and_a_429_reach_the_shared_code_as_status_errors() -> None:
|
||||
@@ -140,14 +147,13 @@ def test_a_422_and_a_429_reach_the_shared_code_as_status_errors() -> None:
|
||||
response=httpx.Response(422, request=request))
|
||||
|
||||
with pytest.raises(httpx.HTTPStatusError):
|
||||
jibe.page(get, SITE, None)
|
||||
jibe.page(get, SITE, None, Ask())
|
||||
|
||||
|
||||
def test_the_slug_the_urls_and_the_allow_list() -> None:
|
||||
for slug in (SITE, "Jobs.Booking.com", "careers.acme.co.uk", "acme.com", "a-b.c-d.example"):
|
||||
assert jibe.slug_ok(slug) and ats.is_known_target(f"jibe:{slug}")
|
||||
assert jibe.careers_url("Jobs.Booking.com") == "https://jobs.booking.com/jobs"
|
||||
assert jibe.robots_page(SITE) == "https://jobs.booking.com/jobs"
|
||||
allow = jibe.allowed("Jobs.Booking.com")
|
||||
assert allow("jobs.booking.com") and allow("JOBS.BOOKING.COM")
|
||||
assert not allow("booking.com") and not allow("evil.example")
|
||||
@@ -171,3 +177,11 @@ def test_discovery_names_jibe_from_its_assets_but_gives_no_host() -> None:
|
||||
'<a href="https://workingatbooking.jibeapply.com/jobs">apply</a>')
|
||||
assert [(h, s) for h, s, _ in discover.boards_in(page)] == [("jibe", "")]
|
||||
assert "jibe" not in {h for h, _ in discover._UNREADABLE}
|
||||
|
||||
|
||||
def test_it_declares_a_paged_read_with_a_total_and_many_places() -> None:
|
||||
reads = jibe.READS
|
||||
assert (reads.listing, reads.page_size, reads.text, reads.complete, reads.places) == (
|
||||
"paged", 100, "listing", "stated", "many")
|
||||
assert reads.fields.country == "stated" and reads.robots.startswith("read: robots.txt")
|
||||
assert not hasattr(jibe, "robots_page")
|
||||
+46
-43
@@ -8,16 +8,16 @@ import sys
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
import httpx
|
||||
import pytest
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
if str(ROOT) not in sys.path:
|
||||
sys.path.insert(0, str(ROOT))
|
||||
|
||||
from app import models as app_models # noqa: E402
|
||||
from app.jobs.discover import boards_in # noqa: E402
|
||||
from plugins import ats, readers # noqa: E402
|
||||
from plugins.readers import jobylon # noqa: E402
|
||||
from plugins.readers import Ask, jobylon # noqa: E402
|
||||
|
||||
FIXTURES = ROOT / "tests" / "fixtures" / "ats"
|
||||
BOARD = (FIXTURES / "jobylon.html").read_bytes()
|
||||
@@ -34,6 +34,7 @@ def test_rows_come_from_the_embeds_literal() -> None:
|
||||
assert first["title"] == "Financial Controller"
|
||||
assert first["url"] == ROLE
|
||||
assert first["location"] == "Stockholm"
|
||||
assert first["places"] == [{"text": "Stockholm", "remote": None}]
|
||||
assert first["department"] == "Accounting & Finance" # `&` read as `&`
|
||||
assert first["remote"] == "hybrid"
|
||||
assert first["description"] == "" and first["salary_text"] == ""
|
||||
@@ -45,6 +46,7 @@ def test_rows_come_from_the_embeds_literal() -> None:
|
||||
def test_places_department_and_remote_follow_the_embeds_words() -> None:
|
||||
rows = {r["source_id"]: r for r in jobylon.parse(BOARD, "3143")}
|
||||
assert rows["384238"]["location"] == "Houston; Dallas; Atlanta"
|
||||
assert [p["text"] for p in rows["384238"]["places"]] == ["Houston", "Dallas", "Atlanta"]
|
||||
assert rows["384238"]["department"] == "" # "All functions" names none
|
||||
assert rows["382124"]["remote"] == "remote"
|
||||
assert rows["382860"]["remote"] == "onsite"
|
||||
@@ -90,7 +92,8 @@ def test_detail_reads_the_role_pages_json_ld() -> None:
|
||||
ROLE_2: (FIXTURES / "jobylon-role-2.html").read_bytes()}
|
||||
first = jobylon.detail(_get(pages, asked), "3143", rows["385191"])
|
||||
assert asked == [ROLE]
|
||||
assert set(first) <= set(ats.DETAIL_FIELDS)
|
||||
assert set(first) <= set(ats.DETAIL_FIELDS) | {"places"}
|
||||
assert first["places"] == [{"text": "Stockholm, Sweden", "remote": None}]
|
||||
assert first["description"].startswith("Want to be part of transforming road freight?")
|
||||
assert "<" not in first["description"] and "world's leading" in first["description"]
|
||||
assert first["posted"] is not None and first["posted"].isoformat() == \
|
||||
@@ -99,6 +102,7 @@ def test_detail_reads_the_role_pages_json_ld() -> None:
|
||||
# All four places, where the embed named three.
|
||||
second = jobylon.detail(_get(pages), "3143", rows["384238"])
|
||||
assert second["location"] == "Houston, TX, USA; Dallas, TX, USA; New Jersey, USA; Atlanta, GA, USA"
|
||||
assert len(second["places"]) == 4
|
||||
|
||||
|
||||
def test_detail_without_a_job_posting_fails_the_read() -> None:
|
||||
@@ -111,48 +115,48 @@ def test_detail_without_a_job_posting_fails_the_read() -> None:
|
||||
jobylon.detail(_get({ROLE: page}), "3143", row)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def web(monkeypatch: pytest.MonkeyPatch) -> dict[str, Any]:
|
||||
answers: dict[str, Any] = {}
|
||||
def test_the_board_is_one_request_and_each_role_is_read_on_its_own_page() -> None:
|
||||
asked: list[str] = []
|
||||
|
||||
def fake_get(client, url, host, slug, *, method="GET", payload=None, headers=None,
|
||||
www_twin=False):
|
||||
asked.append(url)
|
||||
if not ats._allowed_host(host, slug)(httpx.URL(url).host):
|
||||
raise ats._Refused(url)
|
||||
answer = answers[url]
|
||||
if isinstance(answer, BaseException):
|
||||
raise answer
|
||||
return answer
|
||||
|
||||
monkeypatch.setattr(ats, "_get", fake_get)
|
||||
monkeypatch.setattr(ats, "PAGE_DELAY", 0)
|
||||
return {"answers": answers, "asked": asked}
|
||||
pages = {FEED: BOARD, ROLE: (FIXTURES / "jobylon-role.html").read_bytes(),
|
||||
ROLE_2: (FIXTURES / "jobylon-role-2.html").read_bytes()}
|
||||
get = _get(pages, asked)
|
||||
rows = jobylon.parse(get(jobylon.feed_url("3143", Ask())), "3143")
|
||||
assert len(rows) == 5 and asked == [FEED]
|
||||
found = jobylon.detail(get, "3143", rows[0])
|
||||
assert asked == [FEED, ROLE] and found["description"].startswith("Want to be part")
|
||||
|
||||
|
||||
def test_the_board_is_one_request_and_each_role_is_read_once(web: dict[str, Any]) -> None:
|
||||
web["answers"] |= {FEED: BOARD, ROLE: (FIXTURES / "jobylon-role.html").read_bytes(),
|
||||
ROLE_2: (FIXTURES / "jobylon-role-2.html").read_bytes()}
|
||||
with httpx.Client() as client:
|
||||
rows, complete = ats._fetch_rows(client, "jobylon:3143")
|
||||
assert len(rows) == 5 and complete and web["asked"] == [FEED]
|
||||
# The three roles whose pages are not saved answer 404, which counts as read.
|
||||
for row in rows:
|
||||
web["answers"].setdefault(row["url"], httpx.HTTPStatusError(
|
||||
"404", request=httpx.Request("GET", row["url"]),
|
||||
response=httpx.Response(404, request=httpx.Request("GET", row["url"]))))
|
||||
filled, done, failed = ats._read_details(client, "jobylon:3143", rows, complete,
|
||||
set(), set())
|
||||
assert done == {f"jobylon:3143:{r['source_id']}" for r in rows} and not failed
|
||||
assert filled[0]["description"].startswith("Want to be part") and filled[0]["location"]
|
||||
assert filled[2]["description"] == ""
|
||||
def test_an_empty_board_is_no_roles() -> None:
|
||||
assert jobylon.parse(EMPTY, "1056") == []
|
||||
|
||||
|
||||
def test_an_empty_board_is_complete(web: dict[str, Any]) -> None:
|
||||
web["answers"]["https://cdn.jobylon.com/jobs/companies/1056/embed/v2/"] = EMPTY
|
||||
with httpx.Client() as client:
|
||||
assert ats._fetch_rows(client, "jobylon:1056") == ([], True)
|
||||
def test_the_experience_is_mapped_and_a_word_the_table_lacks_is_logged(
|
||||
caplog: pytest.LogCaptureFixture) -> None:
|
||||
caplog.set_level("DEBUG", logger="plugins.readers.jobylon")
|
||||
rows = {r["source_id"]: r for r in jobylon.parse(BOARD, "3143")}
|
||||
assert rows["384238"]["seniority"] == "mid" # "Mid level"
|
||||
assert "seniority" not in rows["385191"] # "Experienced" says too little
|
||||
assert "unknown experience 'Experienced'" in caplog.text
|
||||
assert rows["385191"]["employment"] == "full_time"
|
||||
assert all(r.get("seniority", "mid") in app_models.SENIORITIES for r in rows.values())
|
||||
rows = {r["source_id"]: r for r in jobylon.parse(
|
||||
(FIXTURES / "jobylon-places.html").read_bytes(), "3143")}
|
||||
assert rows["502"]["seniority"] == "intern" and rows["502"]["employment"] == "intern"
|
||||
|
||||
|
||||
def test_a_summary_is_the_teaser_unless_the_embed_says_none() -> None:
|
||||
(row,) = jobylon.parse((FIXTURES / "jobylon-teaser.html").read_bytes(), "3143")
|
||||
assert row["teaser"] == "Lead our Houston depot and its 40 drivers."
|
||||
assert all("teaser" not in r for r in jobylon.parse(BOARD, "3143"))
|
||||
|
||||
|
||||
def test_it_declares_a_whole_listing_with_a_teaser_and_detail() -> None:
|
||||
reads = jobylon.READS
|
||||
assert (reads.listing, reads.text, reads.teaser, reads.places) == (
|
||||
"whole", "detail", True, "many")
|
||||
assert (reads.fields.posted, reads.fields.seniority) == ("trusted", "stated")
|
||||
assert reads.robots.startswith("read: robots.txt allows /jobs/companies/")
|
||||
assert not hasattr(jobylon, "robots_page")
|
||||
|
||||
|
||||
# ------------------------------------------------------- slugs and hosts
|
||||
@@ -163,10 +167,9 @@ def test_the_module_is_registered_as_a_feed_host_with_detail() -> None:
|
||||
assert hasattr(jobylon, "detail") and not hasattr(jobylon, "page")
|
||||
|
||||
|
||||
def test_the_urls_and_the_robots_page() -> None:
|
||||
assert jobylon.feed_url("3143") == FEED
|
||||
def test_the_urls() -> None:
|
||||
assert jobylon.feed_url("3143", Ask()) == FEED
|
||||
assert jobylon.careers_url("3143") == "https://emp.jobylon.com/companies/3143/"
|
||||
assert jobylon.robots_page("3143") == FEED
|
||||
allow = jobylon.allowed("3143")
|
||||
assert allow("cdn.jobylon.com") and allow("emp.jobylon.com") and allow("EMP.JOBYLON.COM")
|
||||
for host in ("jobylon.com", "feed.jobylon.com", "emp.jobylon.com.evil.example",
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
"""The Lever host module's places, country and employment, against a small
|
||||
saved board. No network. The pay and the plain row are in `test_ats.py`."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
if str(ROOT) not in sys.path:
|
||||
sys.path.insert(0, str(ROOT))
|
||||
|
||||
from plugins.readers import Ask, lever # noqa: E402
|
||||
|
||||
BOARD = (ROOT / "tests" / "fixtures" / "ats" / "lever-places.json").read_bytes()
|
||||
|
||||
|
||||
def test_every_place_of_all_locations_is_kept_once() -> None:
|
||||
several, one = lever.parse(BOARD, "acme")
|
||||
assert several["places"] == [{"text": "London", "remote": None},
|
||||
{"text": "Stockholm", "remote": None}]
|
||||
assert several["location"] == "London; Stockholm"
|
||||
assert one["places"] == [{"text": "Berlin", "remote": None}]
|
||||
|
||||
|
||||
def test_the_country_is_only_taken_for_a_role_at_one_place() -> None:
|
||||
several, one = lever.parse(BOARD, "acme")
|
||||
assert "country" not in several and one["country"] == "DE"
|
||||
|
||||
|
||||
def test_the_commitment_is_mapped_and_a_permanent_one_is_left_unmapped() -> None:
|
||||
several, one = lever.parse(BOARD, "acme")
|
||||
assert several["employment"] == "full_time" and "employment" not in one
|
||||
|
||||
|
||||
def test_it_declares_a_whole_listing_of_trusted_dates_and_no_robots_check() -> None:
|
||||
reads = lever.READS
|
||||
assert (reads.listing, reads.text, reads.places) == ("whole", "listing", "many")
|
||||
assert reads.fields.posted == "trusted" and reads.fields.country == "stated"
|
||||
assert reads.robots == "api: no robots.txt check needed (public board API), 2026-09-30"
|
||||
assert lever.feed_url("eu/tomtom", Ask()) == "https://api.eu.lever.co/v0/postings/tomtom?mode=json"
|
||||
@@ -14,6 +14,7 @@ from collections.abc import Callable
|
||||
from datetime import UTC, datetime
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
from plugins.readers._contract import Ask
|
||||
|
||||
import httpx
|
||||
import pytest
|
||||
@@ -590,7 +591,7 @@ def test_a_lever_slug_may_name_the_eu_instance() -> None:
|
||||
assert not ats.is_known_target("lever:eu/a/b")
|
||||
assert ats.careers_url("lever:acme") == "https://jobs.lever.co/acme"
|
||||
assert ats.careers_url("lever:eu/tomtom") == "https://jobs.eu.lever.co/tomtom"
|
||||
assert lever.feed_url("eu/tomtom") == "https://api.eu.lever.co/v0/postings/tomtom?mode=json"
|
||||
assert lever.feed_url("eu/tomtom", Ask()) == "https://api.eu.lever.co/v0/postings/tomtom?mode=json"
|
||||
eu = ats._allowed_host("lever", "eu/tomtom")
|
||||
assert eu("api.eu.lever.co") and not eu("api.lever.co")
|
||||
assert not ats._allowed_host("lever", "tomtom")("api.eu.lever.co")
|
||||
|
||||
@@ -49,10 +49,7 @@ FIXTURE_DIRS = (ROOT / "tests" / "fixtures" / "ats", ROOT / "tests" / "fixtures"
|
||||
|
||||
#: The modules without `READS` yet. Shrinks as D1 (a to l), D2 (o to w) and
|
||||
#: C (the search providers, which arrive declared) land.
|
||||
UNDECLARED = frozenset({
|
||||
"ashby", "bamboohr", "deel", "eightfold", "gem", "greenhouse", "hibob", "hrmanager",
|
||||
"jibe", "jobylon", "lever",
|
||||
})
|
||||
UNDECLARED: frozenset[str] = frozenset()
|
||||
|
||||
|
||||
def _params() -> list[Any]:
|
||||
|
||||
Reference in new issue
Block a user