django-tdd

Automate Django TDD workflows with pytest-django, factory_boy, and DRF tests.

3|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/peopleforrester/claude-dotfiles --skill django-tdd-peopleforrester
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: django-tdd
Source: https://github.com/peopleforrester/claude-dotfiles/tree/main/skills/frameworks/django-tdd
Command: npx skills add https://github.com/peopleforrester/claude-dotfiles --skill django-tdd-peopleforrester

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developing Django apps often requires a structured approach to testing. This Skill provides a disciplined TDD workflow using pytest-django, factory_boy, DRF, and transactional test strategies to speed feedback and improve code quality.

Core Features & Use Cases

  • Structured TDD setup: Setup with pytest-django, Factory Boy factories, and DRF API tests.
  • Comprehensive test strategies: Model, view, API, and integration tests with transactional control.
  • Use Case: A Django project migrating to TDD can scaffold reliable tests and maintainable patterns across modules.

Quick Start

Install required Python packages (pytest-django, factory_boy, djangorestframework), create a sample Django project, add basic tests using factories, and run pytest to verify.

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 TDD workflows in a Django project?

Django TDD workflows are automated using pytest-django for the test runner, factory_boy for model data generation, and djangorestframework for API endpoint testing to provide fast, structured feedback.

What is the best way to test Django REST Framework APIs with pytest?

Testing DRF APIs is handled by writing integration tests that combine pytest-django transactional database controls with factory_boy to generate realistic model instances for API requests.

Do I need factory_boy and pytest-django installed to use this testing workflow?

Yes, you must install and configure pytest-django, factory_boy, and djangorestframework in your Django project environment before scaffolding model, view, and integration tests.

How does factory_boy work with pytest-django for database transactions?

factory_boy generates test data while pytest-django manages transactional test strategies, ensuring each model or view test rolls back database changes automatically for isolated testing.

Can I use this approach to migrate an existing Django project to TDD?

Yes, a Django project migrating to TDD can use this workflow to scaffold reliable tests and establish maintainable patterns across modules using pytest-django and factory_boy.

What types of tests are covered in a structured Django TDD setup?

A structured Django TDD setup covers model tests, view tests, API tests using DRF, and integration tests, all managed across database transactions via pytest-django configuration.