mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
#289 added setMyCommands test
This commit is contained in:
parent
c8f126b8ea
commit
38a2309c32
2 changed files with 16 additions and 0 deletions
|
|
@ -473,6 +473,17 @@ async def test_answer_callback_query(bot: Bot, event_loop):
|
|||
assert result is True
|
||||
|
||||
|
||||
async def test_set_my_commands(bot: Bot, event_loop):
|
||||
""" setMyCommands method test """
|
||||
from .types.dataset import BOT_COMMAND
|
||||
|
||||
async with FakeTelegram(message_dict=True, loop=event_loop):
|
||||
commands = [types.BotCommand(**BOT_COMMAND), types.BotCommand(**BOT_COMMAND)]
|
||||
result = await bot.set_my_commands(commands)
|
||||
assert isinstance(result, bool)
|
||||
assert result is True
|
||||
|
||||
|
||||
async def test_edit_message_text_by_bot(bot: Bot, event_loop):
|
||||
""" editMessageText method test """
|
||||
from .types.dataset import EDITED_MESSAGE
|
||||
|
|
|
|||
|
|
@ -35,6 +35,11 @@ AUDIO = {
|
|||
"file_size": 9507774,
|
||||
}
|
||||
|
||||
BOT_COMMAND = {
|
||||
"command": "start",
|
||||
"description": "Start bot",
|
||||
}
|
||||
|
||||
CHAT_MEMBER = {
|
||||
"user": USER,
|
||||
"status": "administrator",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue