mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Add sendChatAction test
This commit is contained in:
parent
3e77aa2775
commit
c0e4d480dd
1 changed files with 12 additions and 0 deletions
|
|
@ -247,3 +247,15 @@ async def test_send_contact(bot: Bot, event_loop):
|
|||
result = await bot.send_contact(msg.chat.id, phone_number=contact.phone_number, first_name=contact.first_name,
|
||||
last_name=contact.last_name, disable_notification=False)
|
||||
assert result == msg
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_send_chat_action(bot: Bot, event_loop):
|
||||
""" sendChatAction method test """
|
||||
from .types.dataset import CHAT
|
||||
chat = types.Chat(**CHAT)
|
||||
|
||||
async with FakeTelegram(message_dict=True, loop=event_loop):
|
||||
result = await bot.send_chat_action(chat_id=chat.id, action=types.ChatActions.TYPING)
|
||||
assert isinstance(result, bool)
|
||||
assert result is True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue