修正 OpenAPI 固定请求头日志与异步测试#122
Closed
117503445 wants to merge 1 commit into
Closed
Conversation
用户要求:处理 PR Serverless-Devs#119 中关于固定请求头日志和 async 测试 mock 的 review 意见。 实现思路: - debug 日志改为打印实际发送的 request_arguments - 避免过滤前 arguments 中的 header-like 参数进入日志 - 新增 fixed header async 测试的 __aexit__ 显式返回 False,避免吞异常 Signed-off-by: 黑曜 <haotian.qht@alibaba-inc.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动说明
补充修复 #119 合入后遗留的 review feedback:
call_tool/call_tool_async的 debug 日志改为打印实际发送的request_arguments。arguments中的 fixed-header-like 参数进入日志。__aexit__设为AsyncMock(return_value=False),避免 context manager mock 吞异常。验证
uv run pytest tests/unittests/tool/test_openapi.py -quv run pyink --check --config pyproject.toml agentrun/tool/api/openapi.py tests/unittests/tool/test_openapi.pyuv run isort --check-only agentrun/tool/api/openapi.py tests/unittests/tool/test_openapi.pygit diff --check -- agentrun/tool/api/openapi.py tests/unittests/tool/test_openapi.py关联