#289 added getMyCommands test

This commit is contained in:
Oleg A 2020-04-05 17:26:53 +03:00
parent 505d6bf75b
commit 29d767bd78

View file

@ -484,6 +484,17 @@ async def test_set_my_commands(bot: Bot, event_loop):
assert result is True assert result is True
async def test_get_my_commands(bot: Bot, event_loop):
""" getMyCommands method test """
from .types.dataset import BOT_COMMAND
command = types.BotCommand(**BOT_COMMAND)
commands = [command, command]
async with FakeTelegram(message_data=commands, loop=event_loop):
result = await bot.get_my_commands()
assert isinstance(result, list)
assert all([isinstance(command, types.BotCommand) for command in result])
async def test_edit_message_text_by_bot(bot: Bot, event_loop): async def test_edit_message_text_by_bot(bot: Bot, event_loop):
""" editMessageText method test """ """ editMessageText method test """
from .types.dataset import EDITED_MESSAGE from .types.dataset import EDITED_MESSAGE