home/categories/testing/project-n-e-k-o-n-e-k-o-agent-skills-pytest-asyncio-httpx-mocking-skill-md
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.

Project-N-E-K-O
maintainer
Project-N-E-K-O
更新日 3/22/2026
スター
946
フォーク
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.

インストール
$ install --globalskills.sh
使い方

インストール後、ターミナルで以下のコマンドを実行してこのスキルを使用できます:

skills use pytest-asyncio-httpx-mocking