Skip to content

Commit 229b086

Browse files
committed
fix: update test to use ResponseCustomToolCall for apply_patch call in HITL coverage
1 parent ecb6c11 commit 229b086

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__ import annotations
22

3+
import json
34
from typing import Any, cast
45

56
import httpx
67
import pytest
78
from openai import BadRequestError
89
from openai.types.responses import (
910
ResponseComputerToolCall,
11+
ResponseCustomToolCall,
1012
)
1113
from openai.types.responses.response_function_tool_call import ResponseFunctionToolCall
1214
from openai.types.responses.response_output_item import (
@@ -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)