django-tdd

Django testing strategies with pytest-django, TDD methodology, factory_boy, mocking, coverage, and testing Django REST Framework APIs.

Content Preview
---
name: django-tdd
description: Django testing strategies with pytest-django, TDD methodology, factory_boy, mocking, coverage, and testing Django REST Framework APIs.
---

# Django テスト駆動開発(TDD)

pytest、factory_boy、Django REST Frameworkを使用したDjangoアプリケーションのテスト駆動開発。

## いつ有効化するか

- 新しいDjangoアプリケーションを書くとき
- Django REST Framework APIを実装するとき
- Djangoモデル、ビュー、シリアライザーをテストするとき
- Djangoプロジェクトのテストインフラを設定するとき

## DjangoのためのTDDワークフロー

### Red-Green-Refactorサイクル

```python
# ステップ1: RED - 失敗するテストを書く
def test_
How to Use

Recommended: Install to project (local)

mkdir -p .claude/skills
curl -o .claude/skills/django-tdd.md \
  https://raw.githubusercontent.com/affaan-m/everything-claude-code/main/docs/ja-JP/skills/django-tdd/SKILL.md

Skill is scoped to this project only. Add .claude/skills/ to your .gitignoreif you don't want to commit it.

Alternative: Clone full repo

git clone https://github.com/affaan-m/everything-claude-code

Then reference at docs/ja-JP/skills/django-tdd/SKILL.md

Related Skills