Commit 23212f1
CI round 2: fix the 5 tests broken by earlier commits' side effects
Two more side-effect breakages the first CI fix missed (the
admin_refresh + JobReview type fixes were the only failures
visible in the prior CI run; expanding the log on the new run
surfaced these once the suite started running again).
tests/test_jd_parser.py — 4 tests
Hard-coded `static/demo_job_description/` paths broke when
commit `facf822` ("Reorganize docs: SQL into docs/sql/, static
+ pdf_rendered into docs/") moved the fixture directory to
`docs/static/demo_job_description/`. Production code is fine —
`src/config.py:STATIC_DIR` was updated in the same commit and
resolves to the new path. Only the test file's hard-coded
literals were left behind.
Fix: prepend `docs` to all four paths.
tests/test_workday_job_source.py::test_adapter_paginates_until_max_or_total
Test mocked 3 pages of 50 jobs each and asserted `len(fake.calls)
== 3` because the old `_PAGE_SIZE = 50` made offset land at
exactly `total = 150` after page 3. Commit `18fde26`
("Refresh worker: fix Workday 0-jobs + Ashby chunk timeouts")
dropped `_PAGE_SIZE` to 20 to dodge Workday's tightened API
limit, which broke the assertion math.
Fix: derive page mock + assertion from the live `_PAGE_SIZE`
constant. The test now works at any page size:
pages_to_return * _PAGE_SIZE = total → exactly that many
POSTs land before the offset == total early-stop trips.
This way the next time Workday changes their limit and we
bump `_PAGE_SIZE`, the test self-adjusts.
Verified locally: 350/350 pytest pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 7cd5b94 commit 23212f1
2 files changed
Lines changed: 33 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
186 | 195 | | |
187 | 196 | | |
188 | 197 | | |
189 | 198 | | |
190 | | - | |
191 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
192 | 202 | | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
200 | 211 | | |
201 | 212 | | |
202 | 213 | | |
| |||
207 | 218 | | |
208 | 219 | | |
209 | 220 | | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
214 | 226 | | |
215 | 227 | | |
216 | 228 | | |
| |||
0 commit comments