--- # nuzlocke-tracker-9c66 title: Integration tests for Genlockes & Bosses API status: completed type: task priority: normal created_at: 2026-02-10T09:33:26Z updated_at: 2026-02-21T12:20:37Z parent: nuzlocke-tracker-yzpb --- Write integration tests for the genlocke challenge and boss battle API endpoints. ## Checklist - [x] Test genlocke CRUD operations (create, list, get, update, delete) - [x] Test leg management (add/remove legs to a genlocke) - [x] Test Pokemon transfers between genlocke legs - [x] Test boss battle CRUD (create, list, update, delete per game) - [x] Test boss battle results per run (record win/loss) - [x] Test stats endpoint for run statistics - [x] Test export endpoint - [x] Test error cases (invalid transfers, boss results for wrong game, etc.) ## Notes - Genlocke endpoints: `backend/src/app/api/genlockes.py` - Boss endpoints: `backend/src/app/api/bosses.py` - Stats endpoints: `backend/src/app/api/stats.py` - Export endpoints: `backend/src/app/api/export.py` - Genlocke tests require multiple runs as fixtures