mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Bot API 7.0 tests for SetMessageReaction
This commit is contained in:
parent
097005355a
commit
0f949a0ebc
1 changed files with 25 additions and 0 deletions
25
tests/test_api/test_methods/test_set_message_reaction.py
Normal file
25
tests/test_api/test_methods/test_set_message_reaction.py
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue