Pytest Asyncio Httpx Mocking

When masking httpx.AsyncClient with unittest.mock in Pytest, AsyncMock must be used instead of MagicMock for async methods like post/get to prevent TypeError when awaited.

project-n-e-k-o Updated 3.2k repo stars

File contents

project-n-e-k-o/n.e.k.o commit e77fa2e41b

Frequently asked questions

npx get-skill add project-n-e-k-o/pytest-asyncio-httpx-mocking