Django测试策略,包括pytest-django、TDD方法论、factory_boy、模拟、覆盖率以及测试Django REST Framework API。
68
53%
Does it follow best practices?
Impact
95%
1.25xAverage score across 3 eval scenarios
Advisory
Suggest reviewing before use
Optimize this skill with Tessl
npx tessl skill review --optimize ./docs/zh-CN/skills/django-tdd/SKILL.mdFactory Boy test data setup
DjangoModelFactory base
100%
100%
Sequence for unique fields
100%
100%
PostGenerationMethodCall for password
0%
100%
factory.Faker for string fields
100%
100%
FuzzyDecimal or FuzzyInteger for numerics
0%
100%
SubFactory for ForeignKey
100%
100%
LazyAttribute for derived fields
100%
100%
post_generation for M2M
100%
100%
Uses factories in tests
100%
100%
create_batch usage
0%
100%
Boundary case testing
100%
100%
Test independence
100%
100%
pytest and test settings configuration
DJANGO_SETTINGS_MODULE in pytest.ini
100%
100%
testpaths configuration
0%
100%
python_files/classes/functions patterns
100%
100%
--reuse-db flag
100%
100%
--nomigrations flag
0%
100%
Coverage flags
0%
100%
SQLite in-memory database
100%
100%
DisableMigrations class
100%
100%
MD5PasswordHasher
100%
100%
Celery eager execution
100%
100%
--strict-markers flag
100%
100%
markers declaration
100%
100%
Test settings inherits from base
100%
100%
DRF API testing with mocking and conftest
api_client fixture
100%
100%
authenticated_api_client fixture
87%
62%
force_authenticate usage
100%
100%
timezone fixture
0%
0%
@patch for external service
100%
100%
Mock return value configured
100%
100%
locmem.EmailBackend for email test
0%
100%
mail.outbox assertion
0%
100%
Unauthorized access test
100%
100%
HTTP status code assertions
100%
100%
Uses factories not manual create
100%
62%
Test isolation
100%
100%
Permission boundary test
100%
100%
ae2cadd
Table of Contents
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.