#289 added setMyCommands test

This commit is contained in:
Oleg A 2020-04-05 16:48:34 +03:00
parent c8f126b8ea
commit 38a2309c32
2 changed files with 16 additions and 0 deletions

View file

@ -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

View file

@ -35,6 +35,11 @@ AUDIO = {
"file_size": 9507774,
}
BOT_COMMAND = {
"command": "start",
"description": "Start bot",
}
CHAT_MEMBER = {
"user": USER,
"status": "administrator",