Repository navigation
Commit f1d5a06
authored
test: Add the required unique_key when building a Request without an ID (#1032)
Master CI is red on every type-check and unit-test job:
https://github.com/apify/apify-client-python/actions/runs/32821686073
Two PRs that each passed CI on their own conflict semantically once
merged together:
- #1030 made `unique_key` a required field on `RequestBase`.
- #1025 added two tests that build `Request(url='https://example.com')`
to assert `update_request` rejects a request with no ID.
In that order, the `Request` constructor now raises a pydantic
`ValidationError` for the missing `uniqueKey` before `update_request` is
ever reached — so `ty` reported 2 `missing-argument` diagnostics and
both tests failed on the wrong exception.
Supplying the now-required `unique_key` makes the tests exercise what
they were written for (the missing ID), not model validation.
*✍️ Drafted by Claude Code*1 parent 3e333a0 commit f1d5a06
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
422 | | - | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
423 | 425 | | |
424 | 426 | | |
425 | 427 | | |
426 | 428 | | |
427 | 429 | | |
428 | 430 | | |
429 | 431 | | |
430 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
0 commit comments