@@ -80,7 +80,7 @@ def mock_server(mock_tool, mock_resource, mock_prompt):
8080 server .modified_by = "test_user"
8181 server .created_at = "2023-01-01T00:00:00"
8282 server .updated_at = "2023-01-01T00:00:00"
83- server .is_active = True
83+ server .enabled = True
8484
8585 # Ownership fields for RBAC
8686 server .owner_email = "user@example.com" # Match default test user
@@ -215,7 +215,7 @@ def query_side_effect(model):
215215 icon = "http://example.com/image.jpg" ,
216216 created_at = "2023-01-01T00:00:00" ,
217217 updated_at = "2023-01-01T00:00:00" ,
218- is_active = True ,
218+ enabled = True ,
219219 associated_tools = [],
220220 associated_resources = [],
221221 associated_prompts = [],
@@ -260,7 +260,7 @@ async def test_register_server(self, server_service, test_db, mock_tool, mock_re
260260 mock_db_server .modified_by = "test_user"
261261 mock_db_server .created_at = "2023-01-01T00:00:00"
262262 mock_db_server .updated_at = "2023-01-01T00:00:00"
263- mock_db_server .is_active = True
263+ mock_db_server .enabled = True
264264 mock_db_server .metrics = []
265265
266266 # Create mock lists with append methods
@@ -307,8 +307,8 @@ def capture_add(server):
307307 test_db .get = Mock (
308308 side_effect = lambda cls , _id : {
309309 (DbTool , "101" ): mock_tool ,
310- (DbResource , 201 ): mock_resource ,
311- (DbPrompt , 301 ): mock_prompt ,
310+ (DbResource , " 201" ): mock_resource ,
311+ (DbPrompt , " 301" ): mock_prompt ,
312312 }.get ((cls , _id ))
313313 )
314314
@@ -322,10 +322,10 @@ def capture_add(server):
322322 icon = "server-icon" ,
323323 created_at = "2023-01-01T00:00:00" ,
324324 updated_at = "2023-01-01T00:00:00" ,
325- is_active = True ,
325+ enabled = True ,
326326 associated_tools = ["101" ],
327- associated_resources = [201 ],
328- associated_prompts = [301 ],
327+ associated_resources = [" 201" ],
328+ associated_prompts = [" 301" ],
329329 metrics = {
330330 "total_executions" : 0 ,
331331 "successful_executions" : 0 ,
@@ -359,8 +359,8 @@ def capture_add(server):
359359
360360 assert result .name == "test_server"
361361 assert "101" in result .associated_tools
362- assert 201 in result .associated_resources
363- assert 301 in result .associated_prompts
362+ assert " 201" in result .associated_resources
363+ assert " 301" in result .associated_prompts
364364
365365 @pytest .mark .asyncio
366366 async def test_register_server_name_conflict (self , server_service , mock_server , test_db ):
@@ -428,10 +428,10 @@ async def test_list_servers(self, server_service, mock_server, test_db):
428428 icon = "http://example.com/image.jgp" ,
429429 created_at = "2023-01-01T00:00:00" ,
430430 updated_at = "2023-01-01T00:00:00" ,
431- is_active = True ,
431+ enabled = True ,
432432 associated_tools = ["101" ],
433- associated_resources = [201 ],
434- associated_prompts = [301 ],
433+ associated_resources = [" 201" ],
434+ associated_prompts = [" 301" ],
435435 metrics = {
436436 "total_executions" : 0 ,
437437 "successful_executions" : 0 ,
@@ -464,10 +464,10 @@ async def test_get_server(self, server_service, mock_server, test_db):
464464 icon = "http://example.com/image.jpg" ,
465465 created_at = "2023-01-01T00:00:00" ,
466466 updated_at = "2023-01-01T00:00:00" ,
467- is_active = True ,
467+ enabled = True ,
468468 associated_tools = ["101" ],
469- associated_resources = [201 ],
470- associated_prompts = [301 ],
469+ associated_resources = [" 201" ],
470+ associated_prompts = [" 301" ],
471471 metrics = {
472472 "total_executions" : 0 ,
473473 "successful_executions" : 0 ,
@@ -568,10 +568,10 @@ async def test_update_server(self, server_service, mock_server, test_db, mock_to
568568 icon = "http://example.com/image.jpg" ,
569569 created_at = "2023-01-01T00:00:00" ,
570570 updated_at = "2023-01-01T00:00:00" ,
571- is_active = True ,
571+ enabled = True ,
572572 associated_tools = ["102" ],
573- associated_resources = [202 ],
574- associated_prompts = [302 ],
573+ associated_resources = [" 202" ],
574+ associated_prompts = [" 302" ],
575575 metrics = {
576576 "total_executions" : 0 ,
577577 "successful_executions" : 0 ,
@@ -660,7 +660,7 @@ async def test_update_server_name_conflict(self, server_service, mock_server, te
660660 server_team .visibility = "team"
661661 server_team .team_id = "teamA"
662662
663- conflict_team_server = types .SimpleNamespace (id = "3" , name = "existing_server" , is_active = True , visibility = "team" , team_id = "teamA" )
663+ conflict_team_server = types .SimpleNamespace (id = "3" , name = "existing_server" , enabled = True , visibility = "team" , team_id = "teamA" )
664664
665665 test_db .get = Mock (return_value = server_team )
666666 mock_scalar = Mock ()
@@ -688,7 +688,7 @@ async def test_update_server_name_conflict(self, server_service, mock_server, te
688688 server_public .visibility = "public"
689689 server_public .team_id = None
690690
691- conflict_public_server = types .SimpleNamespace (id = "5" , name = "existing_server" , is_active = True , visibility = "public" , team_id = None )
691+ conflict_public_server = types .SimpleNamespace (id = "5" , name = "existing_server" , enabled = True , visibility = "public" , team_id = None )
692692
693693 test_db .get = Mock (return_value = server_public )
694694 mock_scalar = Mock ()
@@ -727,10 +727,10 @@ async def test_toggle_server_status(self, server_service, mock_server, test_db):
727727 icon = "server-icon" ,
728728 created_at = "2023-01-01T00:00:00" ,
729729 updated_at = "2023-01-01T00:00:00" ,
730- is_active = False ,
730+ enabled = False ,
731731 associated_tools = ["101" ],
732- associated_resources = [201 ],
733- associated_prompts = [301 ],
732+ associated_resources = [" 201" ],
733+ associated_prompts = [" 301" ],
734734 metrics = {
735735 "total_executions" : 0 ,
736736 "successful_executions" : 0 ,
@@ -750,7 +750,7 @@ async def test_toggle_server_status(self, server_service, mock_server, test_db):
750750 test_db .commit .assert_called_once ()
751751 test_db .refresh .assert_called_once ()
752752 server_service ._notify_server_deactivated .assert_called_once ()
753- assert result .is_active is False
753+ assert result .enabled is False
754754
755755 # --------------------------- delete -------------------------------- #
756756 @pytest .mark .asyncio
@@ -821,7 +821,7 @@ def capture_add(server):
821821 icon = None ,
822822 created_at = "2023-01-01T00:00:00" ,
823823 updated_at = "2023-01-01T00:00:00" ,
824- is_active = True ,
824+ enabled = True ,
825825 associated_tools = [],
826826 associated_resources = [],
827827 associated_prompts = [],
@@ -892,7 +892,7 @@ def capture_add(server):
892892 icon = None ,
893893 created_at = "2023-01-01T00:00:00" ,
894894 updated_at = "2023-01-01T00:00:00" ,
895- is_active = True ,
895+ enabled = True ,
896896 associated_tools = [],
897897 associated_resources = [],
898898 associated_prompts = [],
@@ -956,7 +956,7 @@ def capture_add(server):
956956 icon = None ,
957957 created_at = "2023-01-01T00:00:00" ,
958958 updated_at = "2023-01-01T00:00:00" ,
959- is_active = True ,
959+ enabled = True ,
960960 associated_tools = [],
961961 associated_resources = [],
962962 associated_prompts = [],
@@ -1018,7 +1018,7 @@ async def test_update_server_uuid_normalization(self, server_service, test_db):
10181018 existing_server = MagicMock (spec = DbServer )
10191019 existing_server .id = "oldserverid"
10201020 existing_server .name = "Old Name"
1021- existing_server .is_active = True
1021+ existing_server .enabled = True
10221022 existing_server .tools = []
10231023 existing_server .resources = []
10241024 existing_server .prompts = []
@@ -1053,7 +1053,7 @@ async def test_update_server_uuid_normalization(self, server_service, test_db):
10531053 icon = None ,
10541054 created_at = "2023-01-01T00:00:00" ,
10551055 updated_at = "2023-01-01T00:00:00" ,
1056- is_active = True ,
1056+ enabled = True ,
10571057 associated_tools = [],
10581058 associated_resources = [],
10591059 associated_prompts = [],
0 commit comments