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 ):
@@ -227,6 +233,7 @@ async def test_add_tool_servers_creates_mcp_toolsets(
227233 assert mock_toolset in service ._connected_servers
228234
229235 @pytest .mark .asyncio
236+ @pytest .mark .unit
230237 async def test_add_tool_servers_returns_new_agent (
231238 self , mock_agent , mock_authorization , mock_turn_context
232239 ):
@@ -276,6 +283,7 @@ async def test_add_tool_servers_returns_new_agent(
276283 )
277284
278285 @pytest .mark .asyncio
286+ @pytest .mark .unit
279287 async def test_add_tool_servers_handles_toolset_creation_error (
280288 self , mock_agent , mock_authorization , mock_turn_context , mock_server_config
281289 ):
@@ -329,6 +337,7 @@ class TestCleanup:
329337 """Tests for cleanup method."""
330338
331339 @pytest .mark .asyncio
340+ @pytest .mark .unit
332341 async def test_cleanup_closes_connected_servers (self ):
333342 """Test that cleanup closes all connected servers."""
334343 with patch (
@@ -355,6 +364,7 @@ async def test_cleanup_closes_connected_servers(self):
355364 assert service ._connected_servers == []
356365
357366 @pytest .mark .asyncio
367+ @pytest .mark .unit
358368 async def test_cleanup_handles_close_errors (self ):
359369 """Test that cleanup handles errors during close gracefully."""
360370 with patch (
@@ -377,6 +387,7 @@ async def test_cleanup_handles_close_errors(self):
377387 assert service ._connected_servers == []
378388
379389 @pytest .mark .asyncio
390+ @pytest .mark .unit
380391 async def test_cleanup_handles_servers_without_close (self ):
381392 """Test that cleanup handles servers without close method."""
382393 with patch (
0 commit comments