mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-08 17:13:56 +00:00
Add exportChatInviteLink test
This commit is contained in:
parent
dd559da6f4
commit
bd701c3768
2 changed files with 13 additions and 0 deletions
|
|
@ -338,3 +338,14 @@ async def test_promote_chat_member(bot: Bot, event_loop):
|
|||
can_promote_members=True, can_restrict_members=True)
|
||||
assert isinstance(result, bool)
|
||||
assert result is True
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_export_chat_invite_link(bot: Bot, event_loop):
|
||||
""" exportChatInviteLink method test """
|
||||
from .types.dataset import CHAT, INVITE_LINK
|
||||
chat = types.Chat(**CHAT)
|
||||
|
||||
async with FakeTelegram(message_dict=INVITE_LINK, loop=event_loop):
|
||||
result = await bot.export_chat_invite_link(chat_id=chat.id)
|
||||
assert result == INVITE_LINK
|
||||
|
|
|
|||
|
|
@ -404,6 +404,8 @@ FILE = {
|
|||
"file_path": "voice\/file_8"
|
||||
}
|
||||
|
||||
INVITE_LINK = 'https://t.me/joinchat/AbCdEfjKILDADwdd123'
|
||||
|
||||
UPDATE = {
|
||||
"update_id": 123456789,
|
||||
"message": MESSAGE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue