Bump deprecated util and fix warning from tests related with new permissions object.

This commit is contained in:
Alex Root Junior 2019-08-16 22:57:13 +03:00
parent b8dfa739db
commit 19fc1b8d80
3 changed files with 14 additions and 8 deletions

View file

@ -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