The Django-TDD skill provides test-driven development guidance for Django applications using pytest-django, factory_boy, and mocking techniques to test models, views, serializers, and REST Framework APIs. It's designed for Django developers who want to implement TDD methodology, offering configuration templates, fixtures, and the red-green-refactor workflow to establish testing infrastructure and practices. This skill solves the problem of knowing how to structure and execute comprehensive tests for Django projects while following TDD principles.

skills.sh installs
5.9K
GitHub stars
229.1K
last updated
Jul 14, 2026

Install

$ npx -y skills add affaan-m/everything-claude-code --skill django-tdd --agent claude-code

Installs into .claude/skills of the current project.

Files

Django Testing with TDD

Test-driven development for Django applications using pytest, factory_boy, and Django REST Framework.

When to Activate

  • Writing new Django applications
  • Implementing Django REST Framework APIs
  • Testing Django models, views, and serializers
  • Setting up testing infrastructure for Django projects

TDD Workflow for Django

Red-Green-Refactor Cycle

# Step 1: RED - Write failing test
def test_user_creation():
    user = User.objects.create_user(email='test@example.com', password='testpass123')
    assert user.email == 'test@example.com'
    assert user.check_password('testpass123')
    assert not user.is_staff

# Step 2: GREEN - Make test pass
# Create User model or factory

# Step 3: REFACTOR - Improve while keeping tests green

Setup

pytest Configuration

Sponsors

Details

Repository
github.com/affaan-m/everything-claude-code
Categories
Testing & QA, Python

More from affaan-m/everything-claude-code

All 256
1openai avatarplaywright-interactiveopenai/skillsPersistent browser and Electron interaction through `js_repl` for fast iterative UI debugging.5.7Kskills.sh installs
2affaan-m avatarcpp-testingaffaan-m/everything-claude-codecpp testing5.6Kskills.sh installs
3affaan-m avatarrust-testingaffaan-m/everything-claude-coderust testing5.3Kskills.sh installs
4affaan-m avatarlaravel-tddaffaan-m/everything-claude-codelaravel tdd5.1Kskills.sh installs
5affaan-m avatarai-regression-testingaffaan-m/everything-claude-codeai regression testing4.8Kskills.sh installs
6affaan-m avatarkotlin-testingaffaan-m/everything-claude-codekotlin testing4.8Kskills.sh installs