File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
packages/toolbox-core/tests Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 32
32
a. No auth provided.
33
33
b. Correct auth provided.
34
34
c. Auth provided does not contain the required claim.
35
+ d. Auth Service not registered in manifest
35
36
"""
36
37
import pytest
37
38
import pytest_asyncio
@@ -148,6 +149,15 @@ async def test_run_tool_param_auth_no_auth(self, toolbox):
148
149
):
149
150
await tool ()
150
151
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
+
151
161
async def test_run_tool_param_auth (self , toolbox , auth_token1 ):
152
162
"""Tests running a tool with a param requiring auth, with correct auth."""
153
163
tool = await toolbox .load_tool (
You can’t perform that action at this time.
0 commit comments