django-tdd

Apply Django testing workflows for models, views, and APIs with pytest-django.

Updated Nov 21, 2025
One-click install
npx skills add https://github.com/MBarry01/dousell-immo --skill django-tdd-mbarry01
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: django-tdd
Source: https://github.com/MBarry01/dousell-immo/tree/main/.claude/skills/django-tdd
Command: npx skills add https://github.com/MBarry01/dousell-immo --skill django-tdd-mbarry01

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps Django teams implement reliable, test-driven development practices using pytest-django, factory_boy, mocking, and comprehensive API testing.

Core Features & Use Cases

  • Robust unit and integration tests for models, views, and serializers
  • End-to-end DRF API testing with fixtures and mocks
  • Guidance on configuring pytest, fixtures with conftest.py, and test infrastructure for fast, deterministic tests

Quick Start

Create a test suite for a Django project using pytest-django, Factory Boy, and DRF tests.

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 pytest-django and conftest.py fixtures for Django testing?

Django testing with pytest requires configuring pytest, Django settings, and sample conftest.py fixtures to establish test infrastructure. This ensures fast, deterministic test discovery, coverage, and reporting across your project.

What is the best way to test DRF API endpoints with factory_boy and mocks?

Testing DRF API endpoints involves end-to-end validation using factory_boy for model data and mocking for isolation. This approach covers unit tests, integration tests, and API endpoint validation for serializers and views.

Can I use factory_boy with pytest-django for model and integration tests?

Yes, factory_boy works with pytest-django to generate robust model data for unit and integration tests. This combination provides clear guidance on test configurations and fixtures for testing Django models, views, and serializers.

How does TDD apply to Django views and serializers?

TDD for Django views and serializers involves identifying and applying test-driven workflows across models, views, and APIs. It ensures robust unit and integration tests using pytest-django, factory_boy, and mocking.

Does pytest-django work with Django REST Framework API testing?

Pytest-django fully supports Django REST Framework API testing. It enables end-to-end endpoint validation using fixtures and mocks, covering serializers and views to ensure comprehensive API testing workflows.