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 e77fa2e 2.2 KB Updated

File contents

project-n-e-k-o/n.e.k.o/tree/main/.agent/skills/pytest-asyncio-httpx-mocking commit e77fa2e41b

Frequently asked questions

npx skillmds@latest add project-n-e-k-o/pytest-asyncio-httpx-mocking