django-tdd - Write Django tests with TDD
Apply TDD to test Django models, views, serializers, and APIs with pytest-django, factory_boy, and Django REST Framework.
Tags
Updated: 2026-10-16Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Write tests before implementation
- Test Django models
- Test views and serializers
- Test REST APIs
- Configure pytest settings
- Create reusable fixtures
- Create model factories
- Test error cases
- Test database behavior
- Run coverage checks
Inputs
- Django project
- Feature requirements
- Application source code
- Test data
- Database configuration
Outputs
- Test files
- Pytest results
- Coverage reports
- Test configuration
- Fixtures and factories
Requirements
- Python and Django environment
- pytest
- pytest-django
- factory_boy for factories
- Django REST Framework for DRF APIs
