mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
* Update API methods and types for Telegram Bot API 9.5 * Draft: follow-up for Bot API 9.5 (#1780) (#1781) * Add set_chat_member_tag shortcut coverage * Add set_member_tag shortcut tests and align decoration expectations * Fix follow-up test coverage for sender_tag and can_edit_tag * Add changelog fragment for PR 1781 * Align changelog with base PR #1780 * Expand 1780 changelog to cover base and follow-up scope * Treat sender_tag as metadata, not message content type --------- Co-authored-by: Latand <latand@users.noreply.github.com> Co-authored-by: Codex Agent <codex@openclaw.local> * Add tests for date_time formatting with Unix time and datetime objects * Update changelog with Telegram Bot API 9.5 changes --------- Co-authored-by: Kostiantyn Kriuchkov <36363097+Latand@users.noreply.github.com> Co-authored-by: Latand <latand@users.noreply.github.com> Co-authored-by: Codex Agent <codex@openclaw.local>
16 lines
536 B
Python
16 lines
536 B
Python
from aiogram.methods import PromoteChatMember
|
|
from tests.mocked_bot import MockedBot
|
|
|
|
|
|
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,
|
|
can_manage_tags=True,
|
|
)
|
|
request = bot.get_request()
|
|
assert request.can_manage_tags is True
|
|
assert response == prepare_result.result
|