Colin-b / pytest_httpx

pytest fixture to mock HTTPX
https://colin-b.github.io/pytest_httpx/
MIT License
358 stars 30 forks source link

Introduce decorators to setup httpx_mock #137

Closed Colin-b closed 1 month ago

Colin-b commented 8 months ago

Right now only fixtures are available, making it impossible to change the overall behavior of the mock in between test cases. This is currently worked around by separating tests in different files, based on the mock global settings. However it's not user-friendly enough, especially if those tests are essentially part of the same application context, thus belonging to the same test file / class.