Skip to content

Commit 4e6e7f8

Browse files
committed
fix args
1 parent d652c5d commit 4e6e7f8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/toolbox-core/src/toolbox_core/tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ async def __call__(self, *args: Any, **kwargs: Any) -> str:
177177
# Make the API call
178178
async with self.__session.post(
179179
self.__url,
180-
payload=arguments_payload,
180+
json=arguments_payload,
181181
) as resp:
182182
try:
183183
ret = await resp.json()

packages/toolbox-core/tests/test_tool.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ async def test_call_success(
118118
assert result == expected_result
119119
mock_session.post.assert_called_once_with(
120120
tool_details["expected_url"],
121-
payload={"arg1": arg1_val, "opt_arg": opt_arg_val, "req_kwarg": req_kwarg_val},
121+
json={"arg1": arg1_val, "opt_arg": opt_arg_val, "req_kwarg": req_kwarg_val},
122122
)
123123
mock_session.post.return_value.__aenter__.return_value.json.assert_awaited_once()
124124

@@ -178,6 +178,6 @@ async def test_bound_parameter_static_value_call(
178178
mock_session.post.assert_called_once_with(
179179
tool_details["expected_url"],
180180
# Payload should include the bound value for arg1
181-
payload={"arg1": bound_arg1_value, "opt_arg": opt_arg_val, "req_kwarg": req_kwarg_val},
181+
json={"arg1": bound_arg1_value, "opt_arg": opt_arg_val, "req_kwarg": req_kwarg_val},
182182
)
183183
mock_session.post.return_value.__aenter__.return_value.json.assert_awaited_once()

0 commit comments

Comments
 (0)