Install any skill in seconds. Free to start, no credit card required.
Get Started Free →loulanyue/django-tdd
Django testing strategies with pytest-django, TDD methodology, factory_boy, mocking, coverage, and testing Django REST Framework APIs.
Passed 18 of 22 test cases with the skill, and 15 of 22 without it.
3 fixed15 passed either way4 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
Write a pytest test verifying a custom Django model manager query `Product.objects.active()` using batch object instantiation for active and inactive items.
| Checked | Without skill | With skill |
|---|---|---|
| Instantiates test objects using ProductFactory.create_batch | Missed | Passed |
| Asserts Product.objects.active().count() matches expected active item count | Passed | Passed |
The instructions your model reads when the skill loads.
Test-driven development for Django applications using pytest, factory_boy, and Django REST Framework.
# Step 1: RED - Write failing test
def test_user_creation():
user = User.objects.create_user(email='[email protected]', password='testpass123')
assert user.email == '[email protected]'
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
# pytest.ini
[pytest]
DJANGO_SETTINGS_MODULE = config.settings.test
testpaths = tests
python_files = test_*.py
python_classes = Test*
test cases passed, vs 15 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.