claude-code-sdk-python/tests
Yashwant Bezawada 03d4837616 Fix: Only include updatedInput when explicitly provided in permission callbacks
Fixes #1063

When a permission callback returns `PermissionResultAllow()` without
the `updated_input` parameter, the SDK should not include `updatedInput`
in the control_response. Previously, the SDK always included this field,
either with the modified input or falling back to the original input,
which caused MCP tools to receive empty {} arguments instead of Claude's
original arguments.

Changes:
- Modified query.py to only include updatedInput when explicitly set
- Added regression test to verify updatedInput is omitted when not provided
- Existing test for input modification still passes

Before this fix:
```json
{
  "behavior": "allow",
  "updatedInput": {}  // Bug: Always included even when not set
}
```

After this fix:
```json
{
  "behavior": "allow"  // updatedInput only included when explicitly provided
}
```
2025-11-15 16:35:42 -06:00
..
conftest.py Initial Python SDK import 2025-06-12 00:16:19 -07:00
test_changelog.py Add changelog and changelog format check (#77) 2025-07-21 10:53:01 -07:00
test_client.py Rename claude_code to claude_agent (#188) 2025-09-28 14:52:53 -07:00
test_errors.py Rename claude_code to claude_agent (#188) 2025-09-28 14:52:53 -07:00
test_integration.py feat: add max_budget_usd option to Python SDK (#293) 2025-10-30 16:45:35 -07:00
test_message_parser.py Rename claude_code to claude_agent (#188) 2025-09-28 14:52:53 -07:00
test_sdk_mcp_integration.py feat: Added base64 image handling to sdk_mcp_server tool calling (#175) 2025-10-15 07:22:14 -07:00
test_streaming_client.py Fix Windows test failures due to path separator issues (#219) 2025-10-07 16:18:30 -07:00
test_subprocess_buffering.py feat: add cli_path support to ClaudeAgentOptions (#235) 2025-10-12 23:19:53 -07:00
test_tool_callbacks.py Fix: Only include updatedInput when explicitly provided in permission callbacks 2025-11-15 16:35:42 -06:00
test_transport.py Add fallback model handling for parity with TypeScript SDK (#317) 2025-11-07 11:25:45 -08:00
test_types.py Update model references to claude-sonnet-4-5 (#198) 2025-09-30 12:59:14 -07:00