← Back to list

fastapi-tdd
by ahmed6ww
⭐ 1🍴 0📅 Jan 20, 2026
SKILL.md
name: fastapi-tdd description: Expert guide for Test-Driven Development in FastAPI, focusing on the "Quads" strategy and async testing patterns. version: 1.0.0 allowed-tools: "Read,Write,Bash"
FastAPI TDD Standards
1. The Strategy: Testing by Layer (The Quads)
Do not write generic tests. Identify the layer and apply the specific strategy:
Read({baseDir}/references/quad_strategy.md)
2. Async Testing Rules
- Client: Use
httpx.AsyncClientwithASGILifespan. - Event Loop: Never use
TestClient(sync) for async database routes to avoid event loop conflicts [16]. - Overrides: Use
app.dependency_overridesto mock Infrastructure layers when testing Presentation layers [17].
3. Scaffolding
To generate a test file structure that mirrors the source code, run:
python {baseDir}/scripts/scaffold_test.py <path_to_source_file>
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon