From 0f949a0ebcca8fe5ddb0a10d6a2ea36aa648e8fb Mon Sep 17 00:00:00 2001 From: Suren Khorenyan Date: Sat, 30 Dec 2023 22:02:48 +0300 Subject: [PATCH] Bot API 7.0 tests for SetMessageReaction --- .../test_methods/test_set_message_reaction.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/test_api/test_methods/test_set_message_reaction.py diff --git a/tests/test_api/test_methods/test_set_message_reaction.py b/tests/test_api/test_methods/test_set_message_reaction.py new file mode 100644 index 00000000..ee99e99f --- /dev/null +++ b/tests/test_api/test_methods/test_set_message_reaction.py @@ -0,0 +1,25 @@ +from random import randint + +from aiogram.methods import SetMessageReaction +from aiogram.types import ReactionTypeCustomEmoji +from tests.mocked_bot import MockedBot + + +class TestSetMessageReaction: + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + SetMessageReaction, + ok=True, + result=True, + ) + + response: bool = await bot.set_message_reaction( + chat_id=randint(200, 300), + message_id=randint(100, 200), + reaction=[ + ReactionTypeCustomEmoji(custom_emoji="qwerty"), + ], + ) + request = bot.get_request() + assert request + assert response == prepare_result.result