mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Bot API 7.0 tests for dispatcher handle update message_reaction
This commit is contained in:
parent
401f34096c
commit
d20852f59a
1 changed files with 18 additions and 0 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue