Description
Configure a robust testing setup that Claude Code can use to verify implementations.
Requirements
- pytest-django as the test runner
- factory_boy for test data factories
- pytest-cov for coverage reporting
- pytest-xdist for parallel test execution
- Test directory structure mirroring app structure
- Fixtures for common test scenarios (owner, apartment, inspection)
- Base test classes for common patterns
Test Structure
tests/
├── conftest.py # Shared fixtures
├── factories.py # factory_boy factories
├── accounts/
│ ├── test_models.py
│ └── test_views.py
├── apartments/
├── inspections/
└── reports/
Key Factories
OwnerFactory - Creates owner with auth user
ApartmentFactory - Creates apartment with owner
InspectionFactory - Creates inspection with items
InspectorFactory - Creates inspector user
Acceptance Criteria
Description
Configure a robust testing setup that Claude Code can use to verify implementations.
Requirements
Test Structure
Key Factories
OwnerFactory- Creates owner with auth userApartmentFactory- Creates apartment with ownerInspectionFactory- Creates inspection with itemsInspectorFactory- Creates inspector userAcceptance Criteria
pytestruns and passes with zero tests (setup works)make testshortcut works