django-tdd
Django testing strategies with pytest-django, TDD methodology, factory_boy, mocking, coverage, and testing Django REST Framework APIs. Use when writing Django or DRF tests with pytest-django, or driving a Django feature test-first.
Target: Software development & testing. Automatically collected · unverified.
Excerpt from the author’s documentation
Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.
Read the original English text
Topics in the source
- Django Testing with TDD
- When to Activate
- TDD Workflow for Django
- Red-Green-Refactor Cycle
- Setup
- pytest Configuration
- Test Settings
- conftest.py
Test-driven development for Django applications using pytest, factoryboy, and Django REST Framework. Writing new Django applications Implementing Django REST Framework APIs Testing Django models, views, and serializers Setting up testing infrastructure for Django projects Use factories: Instead of manual object creation One assertion per test: Keep tests focused Descriptive test names: testusercannotdeleteotherspost Test edge cases: Empty inputs, None values, boundary conditions Mock external services: Don't depend on external APIs Use fixtures: Eliminate duplication Test permissions: Ensure authorization works Keep tests fast: Use --reuse-db and --nomigrations Don't test Django internals: Trust Django to work Don't test third-party code: Trust libraries to work Don't ignore failing tests: All tests must pass Don't make tests dependent: Tests should run in any order Don't over-mock: Mock only external dependencies Don't test private methods: Test public interface Don't use production database: Always use test database | Component | Target Coverage | |-----------|-----------------| | Models | 90%+ | | Serializers | 85%+ | | Views | 80%+ | | Services | 90%+ | | Utilities | 80%+ | | O
This is an excerpt. Refer to the complete source and its current requirements.
- Source repository
- affaan-m/ECC
- Source file
- pi/core/skills/django-tdd/SKILL.md
- Fixed revision
- d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
Requirements
- Only the author’s Skill metadata is included. Read the full instructions to check dependencies, licensing and conditions of use.
A small first task
先阅读原作者说明,再决定是否在自己的 AI 工具中使用。
Instructions for your AI tool
- Claude Desktop: resource-specific guide not available yet
- Claude Code: resource-specific guide not available yet
- Cursor: resource-specific guide not available yet
- Codex: resource-specific guide not available yet
Author documentation is not live verification by this site. Without evidence, we do not mark a resource as compatible, safe or free.
Sources and evidence
This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.
Author: affaan-m/ECC · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T15:01:42.967Z.
Categories are inferred from names, descriptions and paths. They do not establish compatibility.
License and attribution
MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.
Original license ↗Synchronization, copying and user-reported success do not mark a resource as runtime-tested.
Limitations and notes
- Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.