Colin-b/pytest_httpx

Allow httpx to actually call certain routes

Closed this issue · 3 comments

I'm developing a FastAPI app that uses async route handlers. Because of this I'm using HTTPX as the test client as described here https://fastapi.tiangolo.com/advanced/async-tests/ . The app also uses httpx internally to call other endpoints.

When I tried to use the httpx_mock targeting just the external URLs, I noticed that it was also blocking the Test Client requests.

Is there some way to do this?

Does this feature solve your issue?

But in any case this might be something that should be handled properly without the need for this extra configuration. Please keep me updated on this :)

You mean this was just hiding on the top-level readme??
Thanks for the kind direction, it works great!