Feature: mocking as a feature of the library #1394
Labels
question
Further information is requested
user-experience
Ensuring that users have a good experience using the library
I've been using https://colin-b.github.io/pytest_httpx/ to mock HTTPX in my tests and it works pretty well - but from reading through the source code it looks like will need to be kept up-to-date with changes to HTTPX internals in the future.
This made me think: should mocking be a supported feature of the HTTPX library itself?
Normally I wouldn't suggest this, but due to the way HTTPX is architectude - in particular the ASGI and WSGI integration - I wonder if this might be a library that could be extended to support mocking as a baked-in-feature without too much additional overhead.
Almost every project I write that uses HTTPX needs to mock it at some point in order to write tests. It strikes me that there's a cultural opportunity here to help encourage best practices by promoting a recommended way to write tests for code that makes HTTPX calls to external URLs.
It's probably unnecessary feature creep though.
The text was updated successfully, but these errors were encountered: