Support HTTPX 0.21 leveraging RESPX
This is a gentle proposal to start depending on RESPX, hope I'm not stepping on anyone's toes here.
Mainly I feel that by combining the efforts of pytest_httpx and RESPX, we could ease the maintenance burden together.
The pytest_httpx API is fully kept, AFAIK, by adding the same methods to a custom HTTPXMock RESPX router .
To make the diff easier to review, I've put the new code in a separate _router.py file. Also, as can be seen, most of the new code is string manipulation to preserve identical assertion outputs for the tests.
Fixes #48
Thanks for the proposal @lundberg :) My main priority here will be to support httpx 0.20 first, and then have a look at this if that's ok ? :)
My main priority here will be to support httpx 0.20 first, and then have a look at this if that's ok ? :)
Sure thing @Colin-b.
Though, this draft actually makes pytest_httpx support httpx 0.20, without changing your API 😉 .
Rebased 👍
What's up with SonarCloud, seems to be complaining about your test files being too similar, i.e. duplicated code 😉 , nothing I can do about it.
Bumped RESPX to support HTTPX 0.21.0.
SonarCloud Quality Gate failed. 
0 Bugs
0 Vulnerabilities
0 Security Hotspots
1 Code Smell
No Coverage information
13.2% Duplication
Hello @lundberg , apologies for the delay. I think those projects drifted apart and to be honest I'd rather avoid adding additional dependencies to the project. Thanks again for the proposal !