Skip to content

Commit 1f63b0d

Browse files
committed
add new test case
1 parent cc6d568 commit 1f63b0d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

packages/toolbox-core/tests/test_e2e.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
a. No auth provided.
3333
b. Correct auth provided.
3434
c. Auth provided does not contain the required claim.
35+
d. Auth Service not registered in manifest
3536
"""
3637
import pytest
3738
import pytest_asyncio
@@ -148,6 +149,15 @@ async def test_run_tool_param_auth_no_auth(self, toolbox):
148149
):
149150
await tool()
150151

152+
async def test_run_tool_param_auth_no_service(self, toolbox):
153+
"""Tests running a tool with a param requiring auth, without a correctly registered auth service."""
154+
tool = await toolbox.load_tool("get-row-by-email-auth-wrong-auth-source")
155+
with pytest.raises(
156+
Exception,
157+
match="One of more of the following authn services are required to invoke this tool: my-test-auth3",
158+
):
159+
await tool()
160+
151161
async def test_run_tool_param_auth(self, toolbox, auth_token1):
152162
"""Tests running a tool with a param requiring auth, with correct auth."""
153163
tool = await toolbox.load_tool(

0 commit comments

Comments
 (0)