Skip to content

Commit 5cf5743

Browse files
Fix Python resume_session override test to not require auth
The test_resume_session_sends_overrides_built_in_tool test was passing through to the real CLI for session.resume, which fails without auth credentials. Other resume tests in the same file already returned a fake response for session.resume — this one was missed. Mock now returns a fake response instead of calling through, matching the pattern used by the Node.js equivalent and other Python resume tests.
1 parent bd75b6d commit 5cf5743

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

python/test_client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,12 @@ async def test_resume_session_sends_overrides_built_in_tool(self):
213213
)
214214

215215
captured = {}
216-
original_request = client._client.request
217216

218217
async def mock_request(method, params):
219218
captured[method] = params
220-
return await original_request(method, params)
219+
# Return a fake response instead of calling the real CLI,
220+
# which would fail without auth credentials.
221+
return {"sessionId": params["sessionId"]}
221222

222223
client._client.request = mock_request
223224

0 commit comments

Comments
 (0)