Skip to content

Commit 3b716d0

Browse files
author
martinma51
committed
test(tools): align api tests with current auth and policy text
1 parent c271b22 commit 3b716d0

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

tests/web/api/test_tools_api.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ def test_get_available_tools_requires_auth(self):
241241
"""Test that /api/tools/available requires authentication."""
242242
response = client.get("/api/tools/available")
243243

244-
# Unauthenticated requests return 403
245-
assert response.status_code == 403
244+
# Unauthenticated requests return 401 in the current auth flow.
245+
assert response.status_code == 401
246246

247247
def test_get_available_tools_falls_back_to_other_when_metadata_missing(
248248
self, monkeypatch
@@ -316,10 +316,7 @@ def test_get_available_tools_applies_user_override(self):
316316
assert "browser_navigate" in tool_map
317317
assert tool_map["browser_navigate"]["enabled"] is False
318318
assert tool_map["browser_navigate"]["status"] == "disabled"
319-
assert (
320-
tool_map["browser_navigate"]["status_reason"]
321-
== "Disabled by tool policy"
322-
)
319+
assert tool_map["browser_navigate"]["status_reason"] == "Disabled by admin"
323320
finally:
324321
set_user_tool_overrides_hook(None)
325322

0 commit comments

Comments
 (0)