원클릭으로
api-testing
API testing patterns for FastAPI endpoints using pytest and httpx
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
API testing patterns for FastAPI endpoints using pytest and httpx
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Debug frontend vanilla JS issues - console errors, rendering bugs, SPA navigation, WebSocket
Automates the process of setting up the first admin user or adding new admins via the bootstrap endpoint. Includes a Python script for easy execution.
Push to remote and wait for CI to pass. If CI fails, read logs, fix bugs, and re-push. Repeat until green.
Use when building or debugging LangGraph multi-agent systems - eval-first execution, task decomposition, model routing by complexity, and cost discipline
Use when AI agent modifies API routes or backend logic - catch systematic blind spots where the same model writes and reviews code
Use when making or recording significant architectural decisions - capture context, alternatives, and rationale as structured ADRs
| name | api-testing |
| description | API testing patterns for FastAPI endpoints using pytest and httpx |
httpx.AsyncClient with app from api.maintests/conftest.py (TEST_MODE=true, mock DB)--no-cov flag: .venv\Scripts\python.exe -m pytest --no-cov# All API tests
.venv\Scripts\python.exe -m pytest tests/ --no-cov -v
# Single test file
.venv\Scripts\python.exe -m pytest tests/test_premium_upgrade.py --no-cov -v
# Single test
.venv\Scripts\python.exe -m pytest tests/test_rate_limiting.py::test_login_rate_limit --no-cov -v
# By marker
.venv\Scripts\python.exe -m pytest -m unit --no-cov
import pytest
from httpx import AsyncClient
@pytest.mark.asyncio
async def test_endpoint_name():
async with AsyncClient(app=app, base_url="http://test") as client:
response = await client.post(
"/api/endpoint",
json={"key": "value"},
headers={"Authorization": "Bearer test_token"}
)
assert response.status_code == 200
data = response.json()
assert data["success"] is True
{"X-Test-User-ID": "123"}get_current_user dependency# SlowAPI stores limits in limiter._route_limits dict
key = "module.path" # e.g., "api.routers.user.login"
limits = app.state.limiter._route_limits.get(key)
assert limits is not None
pytest.mark.unit for no-DB testspytest.mark.integration for real DB teststests/test_agent_scenarios.py (pre-existing, broken)--cov flag (breaks SlowAPI inspect.signature)tests/ files together (hangs on external service tests)