testingtesting-security
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.
maintainer
Project-N-E-K-O
Mis à jour 3/22/2026
Étoiles
946
Forks
133
quick start
Installation and usage
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.
Installation
$ install --globalskills.sh
Utilisation
Après l'installation, vous pouvez utiliser ce skill en exécutant la commande suivante dans votre terminal :
skills use pytest-asyncio-httpx-mocking