django-tdd

Set up pytest, factory_boy, and coverage for Django and DRF tests.

Updated May 9, 2026
One-click install
npx skills add https://github.com/kk20300113-png/my-claude-skills --skill django-tdd-kk20300113-png
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: django-tdd
Source: https://github.com/kk20300113-png/my-claude-skills/tree/main/django-tdd
Command: npx skills add https://github.com/kk20300113-png/my-claude-skills --skill django-tdd-kk20300113-png

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the common pain point of writing inconsistent, slow, or incomplete tests for Django and Django REST Framework applications, which often leads to undetected bugs and fragile, hard-to-maintain codebases.

Core Features & Use Cases

  • End-to-End TDD Workflow: Step-by-step Red-Green-Refactor cycle guidance tailored specifically for Django model, view, and API development.
  • Preconfigured Testing Stack: Ready-to-use pytest, pytest-django, factory_boy, and coverage configurations to eliminate manual test setup work.
  • Comprehensive Test Patterns: Built-in examples for model validation, view behavior, DRF serializer and ViewSet testing, external service mocking, and full integration testing.
  • Use Case: A developer building a Django e-commerce API can use this Skill to quickly generate test factories for products and users, write model validation tests, and validate API endpoint behavior without spending hours configuring test infrastructure.

Quick Start

Use the django-tdd skill to set up a complete pytest test suite with factory_boy test factories and DRF API endpoint tests for your new Django inventory management app.

Frequently Asked Questions about django-tdd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a TDD workflow for Django and DRF applications?

Setting up Django TDD involves applying a Red-Green-Refactor cycle using pytest and factory_boy to validate models and DRF endpoints. This Skill provides preconfigured testing stacks and step-by-step guidance to eliminate manual setup and inconsistent test patterns.

What is the best way to generate test data for Django REST Framework API tests?

The best way to generate Django REST Framework test data is using factory_boy to build reusable model factories. This Skill provides preconfigured factory_boy setups to quickly generate users, products, and other data for validating API endpoint behavior.

Does this pytest configuration support end-to-end integration testing for Django?

Yes, the pytest setup supports full end-to-end integration testing for Django projects. It includes built-in patterns for view behavior verification, DRF serializer testing, and comprehensive API endpoint validation within the TDD workflow.

Why are my Django model validation tests inconsistent and slow to run?

Django model validation tests become inconsistent and slow without proper test infrastructure. This Skill solves the problem by providing a preconfigured pytest and factory_boy stack to streamline model validation, external service mocking, and code coverage tracking.

Can I use pytest-django with factory_boy for API endpoint validation?

Yes, you can use pytest-django with factory_boy for API endpoint validation. This Skill preconfigures both tools to validate DRF ViewSet behavior and generate test data without spending hours on manual test infrastructure setup.