Commit 0265d48
LittleCoinCoin
test: add comprehensive tests for MCP configuration models
Add test suites for type field validation and model hierarchy:
Phase 3A Tests (test_mcp_server_config_type_field.py):
- 13 regression tests for type field validation
- Test stdio/sse/http type with command/url validation
- Test backward compatibility without type field
- Test type field serialization and roundtrip
Phase 3B Tests (test_mcp_pydantic_architecture_v4.py):
- 28 regression tests for model hierarchy
- Test base model validation and type inference
- Test host-specific models (Gemini, VS Code, Cursor, Claude)
- Test MCPServerConfigOmni with mixed host fields
- Test HOST_MODEL_REGISTRY dictionary dispatch
- Test from_omni() conversion with field filtering
Updated existing tests:
- Update test_mcp_server_config_no_future_extension_fields
to reflect extra='allow' design for host-specific fields
Test results: 55/55 tests pass (100% pass rate)1 parent 655cf0a commit 0265d48
File tree
3 files changed
+796
-11
lines changed- tests
3 files changed
+796
-11
lines changed
0 commit comments