bito-code-review[bot] commented on PR #43529:
URL: https://github.com/apache/superset/pull/43529#issuecomment-5418526900
<!-- Bito Reply -->
The review comment is correct. The current test only verifies that the
`openWorldHint` attribute exists (is not `None`), but it does not enforce that
the value is `False`, which is the intended safety classification for these
tools. To resolve this, the test should explicitly assert that `openWorldHint`
is `False` for all registered tools.
Here is the corrected test logic:
```python
for registered_tool in _run(mcp.list_tools()):
annotations = registered_tool.annotations
# Assert that openWorldHint is explicitly False
assert annotations.openWorldHint is False, f"Tool
{registered_tool.name} must have openWorldHint=False"
```
Would you like me to fetch all other comments on this PR to validate and
implement fixes for them as well?
**tests/unit_tests/mcp_service/test_mcp_tool_registration.py**
```
for registered_tool in _run(mcp.list_tools()):
annotations = registered_tool.annotations
# Assert that openWorldHint is explicitly False
assert annotations.openWorldHint is False, f"Tool
{registered_tool.name} must have openWorldHint=False"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]