fix: address PR review feedback (round 9)
- Fix emoji clearing bug: use _UNSET sentinel in update_collective so
emoji=None sends {"emoji": null} instead of raising ValueError
- Move collectives_get_trashed_collectives to Read Tools section
- Remove redundant is_trash field from ListTrashedPagesResponse
- Add page lifecycle note to collectives_trash_page docstring
- Add unit test for clearing collective emoji via update_collective
- Add integration test for clearing collective emoji via MCP tool
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
cb16060b1b
commit
52470ea713
@@ -134,6 +134,30 @@ async def test_collectives_set_collective_emoji(
|
||||
logger.info("Collective emoji updated")
|
||||
|
||||
|
||||
async def test_collectives_clear_collective_emoji(
|
||||
nc_mcp_client: ClientSession, temporary_collective: dict
|
||||
):
|
||||
"""Test clearing a collective's emoji by passing null."""
|
||||
cid = temporary_collective["id"]
|
||||
|
||||
# Set an emoji first
|
||||
set_result = await nc_mcp_client.call_tool(
|
||||
"collectives_set_collective_emoji",
|
||||
{"collective_id": cid, "emoji": "🔬"},
|
||||
)
|
||||
assert set_result.isError is False
|
||||
|
||||
# Clear the emoji by passing null
|
||||
clear_result = await nc_mcp_client.call_tool(
|
||||
"collectives_set_collective_emoji",
|
||||
{"collective_id": cid, "emoji": None},
|
||||
)
|
||||
assert clear_result.isError is False
|
||||
data = json.loads(clear_result.content[0].text)
|
||||
assert data["collective_id"] == cid
|
||||
logger.info("Collective emoji cleared")
|
||||
|
||||
|
||||
# --- Page CRUD ---
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user