@@ -69,19 +69,19 @@ def mock_prompt(self):
6969 prompt .copy .return_value = prompt
7070 return prompt
7171
72- def test_init_default_allow_write (self , mock_target_mcp ):
73- """Test McpProxyManager initialization with default allow_write ."""
72+ def test_init_default_read_only (self , mock_target_mcp ):
73+ """Test McpProxyManager initialization with default read_only ."""
7474 manager = McpProxyManager (mock_target_mcp )
7575
7676 assert manager .target_mcp == mock_target_mcp
77- assert manager .allow_write is False
77+ assert manager .read_only is False
7878
79- def test_init_custom_allow_write (self , mock_target_mcp ):
80- """Test McpProxyManager initialization with custom allow_write ."""
81- manager = McpProxyManager (mock_target_mcp , allow_write = True )
79+ def test_init_custom_read_only (self , mock_target_mcp ):
80+ """Test McpProxyManager initialization with custom read_only ."""
81+ manager = McpProxyManager (mock_target_mcp , read_only = True )
8282
8383 assert manager .target_mcp == mock_target_mcp
84- assert manager .allow_write is True
84+ assert manager .read_only is True
8585
8686 @pytest .mark .asyncio
8787 async def test_add_proxy_content_success (
@@ -93,7 +93,7 @@ async def test_add_proxy_content_success(
9393 mock_proxy .get_resources .return_value = {'test_resource' : mock_resource }
9494 mock_proxy .get_prompts .return_value = {'test_prompt' : mock_prompt }
9595
96- manager = McpProxyManager (mock_target_mcp , allow_write = True )
96+ manager = McpProxyManager (mock_target_mcp , read_only = True )
9797 await manager .add_proxy_content (mock_proxy )
9898
9999 # Verify all methods were called
@@ -120,31 +120,31 @@ async def test_add_tools_success(self, mock_target_mcp, mock_proxy, mock_tool):
120120
121121 @pytest .mark .asyncio
122122 async def test_add_tools_skip_write_tools (self , mock_target_mcp , mock_proxy , mock_tool ):
123- """Test that tools requiring write permissions are skipped when allow_write=False ."""
123+ """Test that tools requiring write permissions are skipped when read_only=True ."""
124124 # Setup tool with write permissions required
125125 annotations = MagicMock ()
126126 annotations .readOnlyHint = False
127127 mock_tool .annotations = annotations
128128
129129 mock_proxy .get_tools .return_value = {'write_tool' : mock_tool }
130130
131- manager = McpProxyManager (mock_target_mcp , allow_write = False )
131+ manager = McpProxyManager (mock_target_mcp , read_only = True )
132132 await manager ._add_tools (mock_proxy )
133133
134134 # Verify tool was not added (skipped)
135135 mock_target_mcp .add_tool .assert_not_called ()
136136
137137 @pytest .mark .asyncio
138- async def test_add_tools_allow_write_tools (self , mock_target_mcp , mock_proxy , mock_tool ):
139- """Test that tools requiring write permissions are added when allow_write=True ."""
138+ async def test_add_tools_not_read_only_tools (self , mock_target_mcp , mock_proxy , mock_tool ):
139+ """Test that tools requiring write permissions are added when read_only=False ."""
140140 # Setup tool with write permissions required
141141 annotations = MagicMock ()
142142 annotations .readOnlyHint = False
143143 mock_tool .annotations = annotations
144144
145145 mock_proxy .get_tools .return_value = {'write_tool' : mock_tool }
146146
147- manager = McpProxyManager (mock_target_mcp , allow_write = True )
147+ manager = McpProxyManager (mock_target_mcp , read_only = False )
148148 await manager ._add_tools (mock_proxy )
149149
150150 # Verify tool was added
@@ -160,7 +160,7 @@ async def test_add_tools_readonly_tools(self, mock_target_mcp, mock_proxy, mock_
160160
161161 mock_proxy .get_tools .return_value = {'readonly_tool' : mock_tool }
162162
163- manager = McpProxyManager (mock_target_mcp , allow_write = False )
163+ manager = McpProxyManager (mock_target_mcp , read_only = True )
164164 await manager ._add_tools (mock_proxy )
165165
166166 # Verify tool was added
@@ -276,27 +276,27 @@ async def test_add_proxy_content_prompts_exception_handled(
276276
277277 @pytest .mark .asyncio
278278 async def test_add_tools_no_annotations (self , mock_target_mcp , mock_proxy , mock_tool ):
279- """Test that tools with no annotations are skipped when allow_write=False ."""
279+ """Test that tools with no annotations are skipped when read_only=True ."""
280280 # Setup tool with no annotations
281281 mock_tool .annotations = None
282282
283283 mock_proxy .get_tools .return_value = {'no_annotations_tool' : mock_tool }
284284
285- manager = McpProxyManager (mock_target_mcp , allow_write = False )
285+ manager = McpProxyManager (mock_target_mcp , read_only = True )
286286 await manager ._add_tools (mock_proxy )
287287
288288 # Verify tool was not added (skipped)
289289 mock_target_mcp .add_tool .assert_not_called ()
290290
291291 @pytest .mark .asyncio
292292 async def test_add_tools_empty_annotations (self , mock_target_mcp , mock_proxy , mock_tool ):
293- """Test that tools with empty annotations are skipped when allow_write=False ."""
293+ """Test that tools with empty annotations are skipped when read_only=True ."""
294294 # Setup tool with empty annotations
295295 mock_tool .annotations = {}
296296
297297 mock_proxy .get_tools .return_value = {'empty_annotations_tool' : mock_tool }
298298
299- manager = McpProxyManager (mock_target_mcp , allow_write = False )
299+ manager = McpProxyManager (mock_target_mcp , read_only = True )
300300 await manager ._add_tools (mock_proxy )
301301
302302 # Verify tool was not added (skipped)
0 commit comments