Kludex / Kludex/bump-testclient
Replace `response.ok` with `response.is_success`
- Dominant language
- Python
- Stars
- 42
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
I have a couple of unit tests like these:
```
response = client.post(Routes.JOBS, json=job_dict)
assert response.ok
```
Based on https://www.python-httpx.org/compatibility/#checking-for-success-and-failure-responses (and https://github.com/encode/httpx/issues/543, https://github.com/encode/httpx/pull/574) a replacement for this requests functionality in httpx exists with `response.is_success`
Contributor guide
No contributing guide indexed for this repository
Research direction
Search the unit tests for uses of response.ok, starting with the example involving client.post(Routes.JOBS, json=job_dict). Replace those checks with response.is_success, then run the test suite to confirm the updated assertions pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100