@@ -29,16 +29,16 @@ async def _get_test_file_id(nc_mcp: McpTestHelper) -> int:
2929class TestListTags :
3030 @pytest .mark .asyncio
3131 async def test_returns_list (self , nc_mcp : McpTestHelper ) -> None :
32- result = await nc_mcp .call ("list_tags" )
33- data = json .loads (result )
32+ result = await nc_mcp .call ("list_tags" , limit = 200 )
33+ data = json .loads (result )[ "data" ]
3434 assert isinstance (data , list )
3535
3636 @pytest .mark .asyncio
3737 async def test_created_tag_appears_in_list (self , nc_mcp : McpTestHelper ) -> None :
3838 tag_id = await _create_tag (nc_mcp , "mcp-test-visible" )
3939 try :
40- result = await nc_mcp .call ("list_tags" )
41- tags = json .loads (result )
40+ result = await nc_mcp .call ("list_tags" , limit = 200 )
41+ tags = json .loads (result )[ "data" ]
4242 ids = [t ["id" ] for t in tags ]
4343 assert tag_id in ids
4444 tag = next (t for t in tags if t ["id" ] == tag_id )
@@ -53,8 +53,8 @@ async def test_created_tag_appears_in_list(self, nc_mcp: McpTestHelper) -> None:
5353 async def test_tag_has_required_fields (self , nc_mcp : McpTestHelper ) -> None :
5454 tag_id = await _create_tag (nc_mcp , "mcp-test-fields" )
5555 try :
56- result = await nc_mcp .call ("list_tags" )
57- tags = json .loads (result )
56+ result = await nc_mcp .call ("list_tags" , limit = 200 )
57+ tags = json .loads (result )[ "data" ]
5858 tag = next (t for t in tags if t ["id" ] == tag_id )
5959 for field in ["id" , "name" , "user_visible" , "user_assignable" ]:
6060 assert field in tag , f"Missing field: { field } "
@@ -100,7 +100,7 @@ async def test_create_non_assignable_tag(self, nc_mcp: McpTestHelper) -> None:
100100 result = await nc_mcp .call ("create_tag" , name = "mcp-test-noa" , user_assignable = False )
101101 tag_id = int (json .loads (result )["id" ])
102102 try :
103- tags = json .loads (await nc_mcp .call ("list_tags" ))
103+ tags = json .loads (await nc_mcp .call ("list_tags" , limit = 200 ))[ "data" ]
104104 tag = next (t for t in tags if t ["id" ] == tag_id )
105105 assert tag ["user_assignable" ] is False
106106 finally :
@@ -218,7 +218,7 @@ async def test_delete_tag(self, nc_mcp: McpTestHelper) -> None:
218218 tag_id = await _create_tag (nc_mcp , "mcp-test-delete" )
219219 result = await nc_mcp .call ("delete_tag" , tag_id = tag_id )
220220 assert "deleted" in result .lower ()
221- tags = json .loads (await nc_mcp .call ("list_tags" ))
221+ tags = json .loads (await nc_mcp .call ("list_tags" , limit = 200 ))[ "data" ]
222222 assert not any (t ["id" ] == tag_id for t in tags )
223223
224224 @pytest .mark .asyncio
@@ -239,8 +239,8 @@ async def test_delete_removes_from_files(self, nc_mcp: McpTestHelper) -> None:
239239class TestSystemTagPermissions :
240240 @pytest .mark .asyncio
241241 async def test_read_only_allows_list (self , nc_mcp_read_only : McpTestHelper ) -> None :
242- result = await nc_mcp_read_only .call ("list_tags" )
243- assert isinstance (json .loads (result ), list )
242+ result = await nc_mcp_read_only .call ("list_tags" , limit = 200 )
243+ assert isinstance (json .loads (result )[ "data" ] , list )
244244
245245 @pytest .mark .asyncio
246246 async def test_read_only_blocks_create (self , nc_mcp_read_only : McpTestHelper ) -> None :
0 commit comments