mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-06 16:15:51 +00:00
Bump deprecated util and fix warning from tests related with new permissions object.
This commit is contained in:
parent
b8dfa739db
commit
19fc1b8d80
3 changed files with 14 additions and 8 deletions
|
|
@ -333,9 +333,15 @@ async def test_restrict_chat_member(bot: Bot, event_loop):
|
|||
chat = types.Chat(**CHAT)
|
||||
|
||||
async with FakeTelegram(message_dict=True, loop=event_loop):
|
||||
result = await bot.restrict_chat_member(chat_id=chat.id, user_id=user.id, can_add_web_page_previews=False,
|
||||
can_send_media_messages=False, can_send_messages=False,
|
||||
can_send_other_messages=False, until_date=123)
|
||||
result = await bot.restrict_chat_member(
|
||||
chat_id=chat.id,
|
||||
user_id=user.id,
|
||||
permissions=types.ChatPermissions(
|
||||
can_add_web_page_previews=False,
|
||||
can_send_media_messages=False,
|
||||
can_send_messages=False,
|
||||
can_send_other_messages=False
|
||||
), until_date=123)
|
||||
assert isinstance(result, bool)
|
||||
assert result is True
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue