Priority: high
Description
Each test suite currently creates its own ad-hoc test data, leading to inconsistency and duplication. A shared fixtures directory must be created with factory functions for all domain objects: projects, credit batches, listings, retirements, and certificates. This reduces test maintenance overhead.
Acceptance Criteria
- Factory functions created for: Project, CreditBatch, Listing, Retirement, Certificate
- Each factory accepts optional overrides for specific fields
- Fixtures are used consistently across all backend integration tests
- Fixtures are documented with the shape of each object
- Fixtures are reset between test runs using database transactions
Priority: high
Description
Each test suite currently creates its own ad-hoc test data, leading to inconsistency and duplication. A shared fixtures directory must be created with factory functions for all domain objects: projects, credit batches, listings, retirements, and certificates. This reduces test maintenance overhead.
Acceptance Criteria