Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions tests/unit/test_aiocqhttp_poke.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@ def test_poke_to_dict_matches_onebot_v11_segment_format():
}


Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This removal drops the only regression test that verifies the Comp.Poke legacy/compat behavior (accepting the old signature type="poke" and the deprecated qq field, which is still explicitly supported in astrbot/core/message/components.py). To keep coverage while addressing privacy, consider re-adding an equivalent test using clearly synthetic, non-user-identifying data (e.g., a non-real string id) so that legacy compatibility remains protected from regressions.

Suggested change
def test_poke_legacy_signature_with_qq_field_is_supported():
poke = Comp.Poke(type="poke", qq="synthetic_qq_id")
assert poke.toDict() == {
"type": "poke",
"data": {"qq": "synthetic_qq_id"},
}

Copilot uses AI. Check for mistakes.
def test_poke_to_dict_keeps_legacy_qq_compatible():
poke = Comp.Poke(type="poke", qq=2916963017)
assert poke.toDict() == {
"type": "poke",
"data": {"type": "126", "id": "2916963017"},
}


@pytest.mark.asyncio
async def test_respond_stage_treats_poke_with_target_as_non_empty():
stage = RespondStage()
Expand Down
Loading