Django Tdd
Pytest-django test setup, factory_boy fixtures, and TDD workflow for Django and DRF apps.
- CCM score
- 65 of 100
- skills.sh installs
- 13.3K
- GitHub stars
- 312.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers the red-green-refactor cycle for Django models, views, and serializers, with pytest-django as the test runner
- Includes a
pytest.iniwith--reuse-db,--nomigrations, and coverage reporting, plus a test settings module - Provides conftest fixtures for users, API clients, and force-authenticated sessions, plus factory_boy factories
- Designed for writing Django or DRF tests with pytest-django, or building a feature test-first
Install
$ npx -y skills add affaan-m/ecc --skill django-tdd -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Django Testing with TDD
Test-driven development for Django applications using pytest, factory_boy, and Django REST Framework.
When to Activate
- Writing new Django applications
- Implementing Django REST Framework APIs
- Testing Django models, views, and serializers
- Setting up testing infrastructure for Django projects
TDD Workflow for Django
Red-Green-Refactor Cycle
# Step 1: RED - Write failing test
def test_user_creation():
user = User.objects.create_user(email='test@example.com', password='testpass123')
assert user.email == 'test@example.com'
assert user.check_password('testpass123')
assert not user.is_staff
# Step 2: GREEN - Make test pass
# Create User model or factory
# Step 3: REFACTOR - Improve while keeping tests green
Setup
pytest Configuration
Details
- Repository
- github.com/affaan-m/ecc
- Categories
- Testing & QA, Python
- First seen
- Jul 14, 2026
Questions
What does the django-tdd skill do?
The django-tdd skill guides test-driven development for Django applications using pytest-django, factory_boy, mocking, coverage, and testing of Django REST Framework APIs. It covers pytest configuration, test settings, conftest fixtures, and factories for models.
Which category does django-tdd belong to and how does it compare?
django-tdd sits in the Testing & QA category and ranks in the top 50 there. It sets itself apart by focusing on Django specifically, with pytest-django setup, factory_boy factories, and Django REST Framework API testing.
How do I install the django-tdd skill?
Run npx -y skills add affaan-m/ecc --skill django-tdd -y inside your project. Once installed, the agent can write and run Django tests driven by the red-green-refactor workflow.
Who should use django-tdd and what does it need?
This skill is for developers writing Django or DRF tests with pytest-django, or building a Django feature test-first. It assumes a Django project with pytest-django and factory_boy available, plus a settings module for tests.
More from affaan-m/ecc
All 257- Deployment Patterns13.3K
- Search First13.3K
- Deep Research13.2K
- Eval Harness13.1K
- Continuous Learning13K
- Cpp Testing13K
- Jpa Patterns13K
- Rust Patterns12.9K
- Kotlin Coroutines Flows12.9K
- Configure Ecc12.9K
- Laravel Tdd12.8K
- Agentic Engineering12.8K
- Clickhouse Io12.7K
- Cost Aware Llm Pipeline12.7K
- Kotlin Patterns12.7K
- Iterative Retrieval12.6K
- Django Verification12.6K
- Nextjs Turbopack12.6K
- Content Engine12.5K
- Springboot Verification12.5K
- Context Budget12.5K
- Nutrient Document Processing12.5K
- Autonomous Loops12.4K
- Architecture Decision Records12.4K
Similar to Django Tdd
More Testing & QApython-testingaffaan-m/ecc14.3K installsPytest testing patterns covering TDD, fixtures, parametrization, mocking, and coverage targets for Python projects.
python-testing-patternswshobson/agents41.5K installsComprehensive pytest guide covering fixtures, mocking, parameterization, and test-driven development workflows for Python.
tdd-workflowaffaan-m/ecc15K installsStrict TDD cycle enforcing RED-GREEN-refactor with 80%+ coverage across unit, integration, and E2E tests.
test-driven-developmentbobmatnyc/claude-mpm-skills412 installsLanguage-agnostic TDD guide covering red-green-refactor, test structure, mocking, and coverage targets for any stack.
tdd-guidealirezarezvani/claude-skills1.1K installsTest-first development skill that generates tests, mocks, and coverage analysis across Jest, Pytest, JUnit, Vitest, and Mocha.