Bot API 7.0 tests for dispatcher handle update message_reaction

This commit is contained in:
Suren Khorenyan 2023-12-30 22:28:21 +03:00
parent 401f34096c
commit d20852f59a

View file

@ -24,6 +24,7 @@ from aiogram.types import (
ChosenInlineResult,
InlineQuery,
Message,
MessageReactionUpdated,
Poll,
PollAnswer,
PollOption,
@ -32,6 +33,7 @@ from aiogram.types import (
ShippingQuery,
Update,
User,
ReactionTypeCustomEmoji,
)
from aiogram.types.error_event import ErrorEvent
from tests.mocked_bot import MockedBot
@ -447,6 +449,22 @@ class TestDispatcher:
True,
True,
),
pytest.param(
"message_reaction",
Update(
update_id=42,
message_reaction=MessageReactionUpdated(
chat=Chat(id=-42, type="channel"),
message_id=12345,
user=User(id=42, is_bot=False, first_name="Test"),
date=datetime.datetime.now(),
old_reaction=[],
new_reaction=[ReactionTypeCustomEmoji(custom_emoji="qwerty")],
),
),
True,
True,
),
],
)
async def test_listen_update(