Commit 9e284fa
committed
fix(claude-runner): Update test_wrapper_vertex.py for new ClaudeCodeAdapter API
The ClaudeCodeAdapter class API changed from accepting context in __init__
to a no-argument constructor with context set via initialize() or direct
assignment. Updated all tests to match the new API.
Changes:
- Fixed import from `claude_code_runner.wrapper` to `wrapper`
- Changed class name from ClaudeCodeWrapper to ClaudeCodeAdapter
- Added wrapper fixture that creates adapter and sets context
- Fixed all lambda signatures to accept (key, default='') parameters
- Fixed all .get(key) calls to .get(key, '') for proper empty string handling
- Mocked _send_log in wrapper fixture to avoid shell setup requirement
- Updated logging assertions from mock_context.send_log to wrapper._send_log
- Fixed error message assertions from "not set" to "must be set"
- Fixed error message assertions from "does not exist" to "not found"
- Renamed test_whitespace_in_env_vars_is_not_trimmed to
test_whitespace_in_env_vars_is_stripped (matches actual behavior)
- Fixed concurrent test lambda signature and removed unused wrapper fixture
All 23 tests in test_wrapper_vertex.py now pass.1 parent 8eb65e1 commit 9e284fa
File tree
1 file changed
+101
-129
lines changed- components/runners/claude-code-runner/tests
1 file changed
+101
-129
lines changed
0 commit comments