--- id: 81d3eb1f-489a-4f1b-b5d2-a7d2590780f8 type: code_pattern title: "Comprehensive unit test coverage pattern" tags: [major-domo, python, testing, patterns] importance: 0.6 confidence: 0.8 created: "2025-12-09T23:19:36.586738+00:00" updated: "2025-12-09T23:19:36.586738+00:00" --- When writing unit tests for helper functions, ensure coverage includes: 1) Happy path with various input types (dict, Pydantic model), 2) Edge cases (None, empty, zero, negative values), 3) Boundary conditions (exact tolerance limits), 4) Large/small value handling, 5) Integration tests with real production models. Expanded salary cap tests from 21 to 30 by adding TestEdgeCases and TestRealTeamModel classes.