diff --git a/tests/test_bot.py b/tests/test_bot.py index 4a5aa358..a910ee6d 100644 --- a/tests/test_bot.py +++ b/tests/test_bot.py @@ -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 diff --git a/tests/types/dataset.py b/tests/types/dataset.py index bc7d9920..ab5cc075 100644 --- a/tests/types/dataset.py +++ b/tests/types/dataset.py @@ -404,6 +404,8 @@ FILE = { "file_path": "voice\/file_8" } +INVITE_LINK = 'https://t.me/joinchat/AbCdEfjKILDADwdd123' + UPDATE = { "update_id": 123456789, "message": MESSAGE