Django testing strategies with pytest-django, TDD methodology, factory_boy, mocking, coverage, and testing Django REST Framework APIs.
86
80%
Does it follow best practices?
Impact
98%
1.24xAverage score across 3 eval scenarios
Passed
No findings from the security scan
Factory Boy data modeling
DjangoModelFactory base class
100%
100%
factory.Sequence for unique fields
100%
100%
PostGenerationMethodCall for password
100%
100%
factory.Faker for text fields
100%
100%
factory.LazyAttribute for derived fields
100%
100%
fuzzy.FuzzyDecimal for price
0%
100%
fuzzy.FuzzyInteger for integer ranges
0%
100%
factory.SubFactory for FK relationships
100%
100%
post_generation for M2M
100%
100%
Factories in tests/factories.py
100%
100%
create_batch usage in tests
100%
100%
No manual object creation
100%
100%
Django test infrastructure setup
pytest DJANGO_SETTINGS_MODULE
100%
100%
pytest testpaths
100%
100%
pytest naming conventions
100%
100%
pytest --reuse-db flag
100%
100%
pytest --nomigrations flag
0%
100%
pytest coverage flags
0%
100%
SQLite in-memory test DB
100%
100%
DisableMigrations class
100%
100%
MD5PasswordHasher
100%
100%
conftest.py user fixtures
100%
100%
authenticated_client fixture
0%
100%
api_client fixture
100%
100%
authenticated_api_client fixture
75%
100%
timezone autouse fixture
0%
100%
DRF API testing patterns
APIClient from rest_framework.test
100%
100%
force_authenticate for auth
100%
100%
status constants
100%
100%
reverse() for URLs
0%
100%
Unauthorized access test
100%
100%
Permission test
100%
100%
Mock external service
100%
100%
Serializer validation test
100%
100%
Descriptive test names
100%
100%
Tests use factories
100%
100%
Tests are independent
100%
100%
Separate test files
100%
100%
No Django internals tested
100%
100%
mail.outbox for email tests
0%
0%
e04ea0b
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.