2022-12-04 03:05:49 +02:00
|
|
|
from aiogram.enums import ChatAction
|
2021-01-26 21:20:52 +02:00
|
|
|
from aiogram.methods import Request, SendChatAction
|
2019-11-18 22:22:46 +02:00
|
|
|
from tests.mocked_bot import MockedBot
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TestSendChatAction:
|
2022-07-09 23:47:11 +03:00
|
|
|
async def test_chat_action_class(self, bot: MockedBot):
|
|
|
|
|
prepare_result = bot.add_result_for(SendChatAction, ok=True, result=True)
|
|
|
|
|
|
|
|
|
|
response: bool = await bot.send_chat_action(chat_id=42, action=ChatAction.TYPING)
|
2023-03-11 20:46:36 +02:00
|
|
|
request = bot.get_request()
|
2022-07-09 23:47:11 +03:00
|
|
|
assert response == prepare_result.result
|