Add set_member_tag shortcut tests and align decoration expectations

This commit is contained in:
Codex Agent 2026-03-02 08:39:41 +00:00
parent a126f8e0b1
commit 705403b2b9
6 changed files with 147 additions and 8 deletions

View file

@ -6,6 +6,11 @@ class TestPromoteChatMember:
async def test_bot_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(PromoteChatMember, ok=True, result=True)
response: bool = await bot.promote_chat_member(chat_id=-42, user_id=42)
bot.get_request()
response: bool = await bot.promote_chat_member(
chat_id=-42,
user_id=42,
can_manage_tags=True,
)
request = bot.get_request()
assert request.can_manage_tags is True
assert response == prepare_result.result

View file

@ -7,5 +7,8 @@ class TestSetChatMemberTag:
prepare_result = bot.add_result_for(SetChatMemberTag, ok=True, result=True)
response: bool = await bot.set_chat_member_tag(chat_id=-42, user_id=42, tag="test")
bot.get_request()
request = bot.get_request()
assert request.chat_id == -42
assert request.user_id == 42
assert request.tag == "test"
assert response == prepare_result.result