@@ -519,7 +519,7 @@ async def test_initialize_with_sse_type_warning(self, stream_manager):
519519 patch ("chuk_tool_processor.mcp.stream_manager.load_config" ) as mock_load ,
520520 patch ("chuk_tool_processor.mcp.stream_manager.SSETransport" ) as mock_sse ,
521521 ):
522- mock_load .return_value = {"url" : "http://test.com" }
522+ mock_load .return_value = ( {"url" : "http://test.com" }, None )
523523 mock_transport = AsyncMock (spec = MCPBaseTransport )
524524 mock_transport .initialize = AsyncMock (return_value = True )
525525 mock_transport .get_tools = AsyncMock (return_value = [])
@@ -539,7 +539,7 @@ async def test_initialize_with_http_streamable_type_warning(self, stream_manager
539539 patch ("chuk_tool_processor.mcp.stream_manager.load_config" ) as mock_load ,
540540 patch ("chuk_tool_processor.mcp.stream_manager.HTTPStreamableTransport" ) as mock_http ,
541541 ):
542- mock_load .return_value = {"url" : "http://test.com" }
542+ mock_load .return_value = ( {"url" : "http://test.com" }, None )
543543 mock_transport = AsyncMock (spec = MCPBaseTransport )
544544 mock_transport .initialize = AsyncMock (return_value = True )
545545 mock_transport .get_tools = AsyncMock (return_value = [])
@@ -558,7 +558,7 @@ async def test_initialize_sse_with_headers(self, stream_manager):
558558 patch ("chuk_tool_processor.mcp.stream_manager.load_config" ) as mock_load ,
559559 patch ("chuk_tool_processor.mcp.stream_manager.SSETransport" ) as mock_sse ,
560560 ):
561- mock_load .return_value = {"url" : "http://test.com" , "headers" : {"Auth" : "Bearer token" }}
561+ mock_load .return_value = ( {"url" : "http://test.com" , "headers" : {"Auth" : "Bearer token" }}, None )
562562 mock_transport = AsyncMock (spec = MCPBaseTransport )
563563 mock_transport .initialize = AsyncMock (return_value = True )
564564 mock_transport .get_tools = AsyncMock (return_value = [])
@@ -580,11 +580,14 @@ async def test_initialize_http_streamable_with_headers_warning(self, stream_mana
580580 patch ("chuk_tool_processor.mcp.stream_manager.load_config" ) as mock_load ,
581581 patch ("chuk_tool_processor.mcp.stream_manager.HTTPStreamableTransport" ) as mock_http ,
582582 ):
583- mock_load .return_value = {
584- "url" : "http://test.com" ,
585- "headers" : {"Auth" : "Bearer token" },
586- "session_id" : "test-session" ,
587- }
583+ mock_load .return_value = (
584+ {
585+ "url" : "http://test.com" ,
586+ "headers" : {"Auth" : "Bearer token" },
587+ "session_id" : "test-session" ,
588+ },
589+ None ,
590+ )
588591 mock_transport = AsyncMock (spec = MCPBaseTransport )
589592 mock_transport .initialize = AsyncMock (return_value = True )
590593 mock_transport .get_tools = AsyncMock (return_value = [])
@@ -605,7 +608,7 @@ async def test_initialize_sse_default_url(self, stream_manager):
605608 patch ("chuk_tool_processor.mcp.stream_manager.load_config" ) as mock_load ,
606609 patch ("chuk_tool_processor.mcp.stream_manager.SSETransport" ) as mock_sse ,
607610 ):
608- mock_load .return_value = "not_a_dict" # Invalid config
611+ mock_load .return_value = ( "not_a_dict" , None ) # Invalid config
609612 mock_transport = AsyncMock (spec = MCPBaseTransport )
610613 mock_transport .initialize = AsyncMock (return_value = True )
611614 mock_transport .get_tools = AsyncMock (return_value = [])
@@ -626,7 +629,7 @@ async def test_initialize_http_streamable_default_url(self, stream_manager):
626629 patch ("chuk_tool_processor.mcp.stream_manager.load_config" ) as mock_load ,
627630 patch ("chuk_tool_processor.mcp.stream_manager.HTTPStreamableTransport" ) as mock_http ,
628631 ):
629- mock_load .return_value = "not_a_dict"
632+ mock_load .return_value = ( "not_a_dict" , None )
630633 mock_transport = AsyncMock (spec = MCPBaseTransport )
631634 mock_transport .initialize = AsyncMock (return_value = True )
632635 mock_transport .get_tools = AsyncMock (return_value = [])
0 commit comments