dispatchrun / dispatch-py

Python package to develop applications with Dispatch.
https://pypi.org/project/dispatch-py/
Apache License 2.0
54 stars 3 forks source link

test: decouple test components from httpx #170

Closed chriso closed 4 months ago

chriso commented 4 months ago

The test components we offer in the dispatch.test package were coupled to the httpx package, since this is what FastAPI uses internally (e.g. for its test client).

To be able to test other web frameworks (e.g. flask from #169), we need to decouple our test components from FastAPI and httpx.

This PR does just that, by using a protocol (i.e. structural typing) for the HTTP client and response.

I've downgraded httpx to a dev dependency as a result.