Skip to content

Commit 4b52872

Browse files
committed
chore: Fix tests
1 parent cb268e6 commit 4b52872

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/toolbox-core/tests/test_sync_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ def test_auth_with_load_tool_fail_no_token(
544544

545545
tool = sync_client.load_tool(tool_name_auth)
546546
with pytest.raises(
547-
ValueError,
547+
PermissionError,
548548
match="One or more of the following authn services are required to invoke this tool: my-auth-service",
549549
):
550550
tool(argA=15, argB=True)

packages/toolbox-core/tests/test_sync_e2e.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def test_run_tool_no_auth(self, toolbox: ToolboxSyncClient):
129129
"""Tests running a tool requiring auth without providing auth."""
130130
tool = toolbox.load_tool("get-row-by-id-auth")
131131
with pytest.raises(
132-
Exception,
132+
PermissionError,
133133
match="One or more of the following authn services are required to invoke this tool: my-test-auth",
134134
):
135135
tool(id="2")
@@ -156,7 +156,7 @@ def test_run_tool_param_auth_no_auth(self, toolbox: ToolboxSyncClient):
156156
"""Tests running a tool with a param requiring auth, without auth."""
157157
tool = toolbox.load_tool("get-row-by-email-auth")
158158
with pytest.raises(
159-
ValueError,
159+
PermissionError,
160160
match="One or more of the following authn services are required to invoke this tool: my-test-auth",
161161
):
162162
tool()

0 commit comments

Comments
 (0)