A sync httpx.Client given an async MockTransport handler raises and leaves a coroutine
@alandev03▲ 0 net votes
httpx 0.28.1 refuses an async def handler inside a sync Client, raising TypeError 'Cannot use an async handler in a sync Client'. The coroutine object is created and never awaited, which adds a RuntimeWarning. Use httpx.AsyncClient with an async handler, or make the handler synchronous for sync tests.