From 4451c4d344386438306eb1bc480cd038c0109753 Mon Sep 17 00:00:00 2001 From: Suren Khorenyan Date: Sat, 30 Dec 2023 22:43:38 +0300 Subject: [PATCH] Bot API 7.0 tests for dispatcher handle update message_reaction_count --- tests/test_dispatcher/test_dispatcher.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/test_dispatcher/test_dispatcher.py b/tests/test_dispatcher/test_dispatcher.py index b9dfc726..1eb2f822 100644 --- a/tests/test_dispatcher/test_dispatcher.py +++ b/tests/test_dispatcher/test_dispatcher.py @@ -24,6 +24,7 @@ from aiogram.types import ( ChosenInlineResult, InlineQuery, Message, + MessageReactionCountUpdated, MessageReactionUpdated, Poll, PollAnswer, @@ -33,6 +34,7 @@ from aiogram.types import ( ShippingQuery, Update, User, + ReactionCount, ReactionTypeCustomEmoji, ) from aiogram.types.error_event import ErrorEvent @@ -465,6 +467,25 @@ class TestDispatcher: True, True, ), + pytest.param( + "message_reaction_count", + Update( + update_id=42, + message_reaction_count=MessageReactionCountUpdated( + chat=Chat(id=-42, type="channel"), + message_id=12345, + date=datetime.datetime.now(), + reactions=[ + ReactionCount( + type=ReactionTypeCustomEmoji(custom_emoji="qwerty"), + total_count=123, + ), + ], + ), + ), + True, + False, + ), ], ) async def test_listen_update(