What problem does it solve?
This Skill reduces fragile, slow, or missing tests in Django projects by providing a clear test-driven development workflow and practical patterns to write fast, maintainable tests that catch regressions early.
Core Features & Use Cases
- Red-Green-Refactor TDD Workflow: Write failing tests first, implement minimal code, then refactor while keeping tests green.
- pytest & pytest-django Configuration: Reuse-db, nomigrations, coverage reporting, and fast test settings for CI and local runs.
- Factories, Fixtures & Mocking: Examples using factory_boy, fixtures for users/clients, DRF APIClient usage, and patching external services for integration tests.
- Use Case: Validate a Django REST Framework Product API end-to-end with serializer, viewset, and permission tests, while ensuring >80% coverage for critical services.
Quick Start
Use the django-tdd skill to write a failing pytest for a DRF Product endpoint, implement the minimal serializer and viewset to make it pass, and run tests with coverage.