Commit da130b2
committed
test: improve coverage for models and toolset modules
Add comprehensive tests for previously uncovered code paths:
models.py (78% -> 95%):
- validate_method unsupported HTTP method error
- ExecuteConfig validation
- Parameter location handling (PATH, QUERY, BODY)
- HTTP error handling (JSON and text response bodies)
- RequestError handling
- Non-dict response wrapping
- OpenAI conversion (enum, array, object, non-dict properties)
- LangChain conversion (number, integer, boolean types)
- Async _arun method
- Tools container iteration and account ID methods
toolset.py (52% -> 77%):
- _StackOneRpcTool execution (basic, JSON string, payloads)
- Header handling (Authorization stripping, None value skipping)
- Argument parsing edge cases
Overall coverage improved from 76% to 87%.1 parent 3e5f8fb commit da130b2
2 files changed
+736
-0
lines changed
0 commit comments