django-tdd

Automate Django testing with pytest-django, factories, and DRF support.

Updated Apr 2, 2026
One-click install
npx skills add https://github.com/richardnpaul/everything-vscode-copilot --skill django-tdd-richardnpaul
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: django-tdd
Source: https://github.com/richardnpaul/everything-vscode-copilot/tree/main/.github/skills/django-tdd
Command: npx skills add https://github.com/richardnpaul/everything-vscode-copilot --skill django-tdd-richardnpaul

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Django projects often suffer from brittle tests and slow feedback loops. This skill provides a ready-to-use TDD workflow with pytest-django, factory_boy, and DRF testing utilities to streamline writing reliable tests for models, views, serializers, and APIs.

Core Features & Use Cases

  • Preconfigured pytest-django setup with test discovery, settings, and coverage
  • Factory-based test data generation using Factory Boy to simplify fixture management
  • DRF API testing guidance with example tests for serializers and viewsets
  • Clear test organization patterns, performance considerations (e.g., using in-memory DB and disabling migrations), and best practices for mocks and fixtures

Quick Start

Run pytest to execute the Django tests with the configured settings and generate a coverage report.

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 testing in Django with pytest and factory_boy?

Django TDD setup is automated by providing a preconfigured pytest-django environment with factory_boy for data generation and DRF testing utilities. You get deterministic tests, in-memory databases, and code coverage reporting ready to use immediately.

What is the best way to test Django REST Framework serializers and viewsets?

Django REST Framework API testing is handled through provided example tests for serializers and viewsets. The skill applies DRF testing utilities to validate API endpoints, ensuring reliable endpoint behavior with preconfigured test patterns.

Can I use pytest-django with factory_boy for model and view testing?

Pytest-django works with factory_boy to simplify fixture management for model and view testing. Factory-based test data generation replaces manual fixtures, streamlining the creation of reliable test cases across Django components.

Why are my Django tests slow and how can I speed them up?

Django tests run faster by applying configurable settings like in-memory databases and disabling migrations. The skill addresses slow feedback loops by optimizing test performance through these preconfigured speed and reliability settings.

Does Django TDD testing work for both models and API endpoints?

Django TDD testing covers models, views, serializers, and API endpoints. The skill provides comprehensive testing support across the entire Django stack, applying consistent patterns for deterministic results at every layer.

What's the difference between Django TDD workflows and standard Django testing?

Django TDD workflows replace brittle tests with factory-based data generation and preconfigured pytest-django settings. Unlike standard setups, this approach enforces deterministic tests with coverage reporting and optimized in-memory database performance.