Skip to content

Commit 16afcce

Browse files
committed
fix: update test to use ResponseCustomToolCall for apply_patch call in HITL coverage
1 parent 335bd77 commit 16afcce

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

‎tests/test_run_hitl_coverage.py‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
from __future__ importannotations
22

3+
importjson
34
fromtypingimportAny, cast
45

56
importhttpx
67
importpytest
78
fromopenaiimportBadRequestError
89
fromopenai.types.responsesimport (
910
ResponseComputerToolCall,
11+
ResponseCustomToolCall,
1012
)
1113
fromopenai.types.responses.response_function_tool_callimportResponseFunctionToolCall
1214
fromopenai.types.responses.response_output_itemimport (
@@ -1129,15 +1131,11 @@ async def fake_run_single_turn(*args, **kwargs):
11291131
"shell call without a shell tool",
11301132
),
11311133
(
1132-
cast(
1133-
Any,
1134-
{
1135-
"id": "p1",
1136-
"call_id": "call1",
1137-
"type": "apply_patch_call",
1138-
"patch": "diff",
1139-
"status": "in_progress",
1140-
},
1134+
ResponseCustomToolCall(
1135+
type="custom_tool_call",
1136+
name="apply_patch",
1137+
call_id="call1",
1138+
input=json.dumps({"patch": "diff"}),
11411139
),
11421140
"apply_patch call without an apply_patch tool",
11431141
),

0 commit comments

Comments
(0)