File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -155,14 +155,11 @@ async def failing_call_next(ctx):
155155 with mock .patch (
156156 "scout_apm.fastmcp.TrackedRequest.instance" , return_value = mock_tracked
157157 ):
158- with mock . patch ( "scout_apm.fastmcp.scout_config" ) as mock_config :
159- mock_config . value . return_value = False # errors_enabled = False
158+ with pytest . raises ( ValueError , match = "Tool failed" ) :
159+ await middleware . on_call_tool ( mock_context , failing_call_next )
160160
161- with pytest .raises (ValueError , match = "Tool failed" ):
162- await middleware .on_call_tool (mock_context , failing_call_next )
163-
164- # Verify error was tagged
165- mock_tracked .tag .assert_any_call ("error" , "true" )
161+ # Verify error was tagged
162+ mock_tracked .tag .assert_any_call ("error" , "true" )
166163
167164 @pytest .mark .asyncio
168165 async def test_on_call_tool_skips_when_disabled (self ):
You can’t perform that action at this time.
0 commit comments