1111class TestMcpToolRegistrationServiceInit :
1212 """Tests for McpToolRegistrationService initialization."""
1313
14+ @pytest .mark .unit
1415 def test_init_default_logger (self ):
1516 """Test initialization with default logger."""
1617 with patch (
@@ -24,6 +25,7 @@ def test_init_default_logger(self):
2425 assert service .config_service is not None
2526 assert service ._connected_servers == []
2627
28+ @pytest .mark .unit
2729 def test_init_custom_logger (self ):
2830 """Test initialization with custom logger."""
2931 import logging
@@ -39,6 +41,7 @@ def test_init_custom_logger(self):
3941
4042 assert service ._logger is custom_logger
4143
44+ @pytest .mark .unit
4245 def test_orchestrator_name (self ):
4346 """Test that orchestrator name is set correctly."""
4447 with patch (
@@ -91,6 +94,7 @@ def mock_server_config(self):
9194 return mock
9295
9396 @pytest .mark .asyncio
97+ @pytest .mark .unit
9498 async def test_add_tool_servers_exchanges_token_when_not_provided (
9599 self , mock_agent , mock_authorization , mock_turn_context
96100 ):
@@ -136,6 +140,7 @@ async def test_add_tool_servers_exchanges_token_when_not_provided(
136140 mock_authorization .exchange_token .assert_called_once ()
137141
138142 @pytest .mark .asyncio
143+ @pytest .mark .unit
139144 async def test_add_tool_servers_uses_provided_token (
140145 self , mock_agent , mock_authorization , mock_turn_context
141146 ):
@@ -178,6 +183,7 @@ async def test_add_tool_servers_uses_provided_token(
178183 mock_authorization .exchange_token .assert_not_called ()
179184
180185 @pytest .mark .asyncio
186+ @pytest .mark .unit
181187 async def test_add_tool_servers_creates_mcp_toolsets (
182188 self , mock_agent , mock_authorization , mock_turn_context , mock_server_config
183189 ):
@@ -229,6 +235,7 @@ async def test_add_tool_servers_creates_mcp_toolsets(
229235 assert mock_toolset in mock_agent .tools
230236
231237 @pytest .mark .asyncio
238+ @pytest .mark .unit
232239 async def test_add_tool_servers_modifies_agent_in_place (
233240 self , mock_agent , mock_authorization , mock_turn_context
234241 ):
@@ -271,6 +278,7 @@ async def test_add_tool_servers_modifies_agent_in_place(
271278 assert existing_tool in mock_agent .tools
272279
273280 @pytest .mark .asyncio
281+ @pytest .mark .unit
274282 async def test_add_tool_servers_handles_toolset_creation_error (
275283 self , mock_agent , mock_authorization , mock_turn_context , mock_server_config
276284 ):
@@ -325,6 +333,7 @@ class TestCleanup:
325333 """Tests for cleanup method."""
326334
327335 @pytest .mark .asyncio
336+ @pytest .mark .unit
328337 async def test_cleanup_closes_connected_servers (self ):
329338 """Test that cleanup closes all connected servers."""
330339 with patch (
@@ -351,6 +360,7 @@ async def test_cleanup_closes_connected_servers(self):
351360 assert service ._connected_servers == []
352361
353362 @pytest .mark .asyncio
363+ @pytest .mark .unit
354364 async def test_cleanup_handles_close_errors (self ):
355365 """Test that cleanup handles errors during close gracefully."""
356366 with patch (
@@ -373,6 +383,7 @@ async def test_cleanup_handles_close_errors(self):
373383 assert service ._connected_servers == []
374384
375385 @pytest .mark .asyncio
386+ @pytest .mark .unit
376387 async def test_cleanup_handles_servers_without_close (self ):
377388 """Test that cleanup handles servers without close method."""
378389 with patch (
0 commit comments