What problem does it solve?
It helps developers prevent regressions and reduce debugging time by establishing a consistent test-first workflow for Django and Django REST Framework projects.
Core Features & Use Cases
- TDD with a Red-Green-Refactor loop: Write failing tests first, implement the minimal code to pass, then refactor while keeping confidence high (e.g., adding a new model method or endpoint behavior).
- pytest-django test infrastructure: Configure fast, deterministic test runs using in-memory SQLite, disabled migrations, and useful markers for slow/integration tests.
- Factories, mocking, and DRF API tests: Use factory_boy for realistic test data, patch external services (like payment providers), and validate DRF serializers/viewsets through authenticated and unauthenticated request flows.
- Coverage guidance: Define coverage goals for models, serializers, views, services, and overall code health.
Quick Start
Ask the AI to generate a complete pytest-django TDD scaffold for a Django REST API that includes settings for fast tests, factory_boy fixtures, and example model/view/DRF tests with mocking.