mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
#289 added sendDice test and dataset
This commit is contained in:
parent
44221872eb
commit
0f245bbf56
2 changed files with 22 additions and 0 deletions
|
|
@ -220,6 +220,16 @@ async def test_send_contact(bot: Bot, event_loop):
|
|||
assert result == msg
|
||||
|
||||
|
||||
async def test_send_dice(bot: Bot, event_loop):
|
||||
""" sendDice method test """
|
||||
from .types.dataset import MESSAGE_WITH_DICE
|
||||
msg = types.Message(**MESSAGE_WITH_DICE)
|
||||
|
||||
async with FakeTelegram(message_dict=MESSAGE_WITH_DICE, loop=event_loop):
|
||||
result = await bot.send_dice(msg.chat.id, disable_notification=False)
|
||||
assert result == msg
|
||||
|
||||
|
||||
async def test_send_chat_action(bot: Bot, event_loop):
|
||||
""" sendChatAction method test """
|
||||
from .types.dataset import CHAT
|
||||
|
|
|
|||
|
|
@ -53,6 +53,10 @@ CONTACT = {
|
|||
"last_name": "Smith",
|
||||
}
|
||||
|
||||
DICE = {
|
||||
"value": 6
|
||||
}
|
||||
|
||||
DOCUMENT = {
|
||||
"file_name": "test.docx",
|
||||
"mime_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||||
|
|
@ -255,6 +259,14 @@ MESSAGE_WITH_CONTACT = {
|
|||
|
||||
MESSAGE_WITH_DELETE_CHAT_PHOTO = {}
|
||||
|
||||
MESSAGE_WITH_DICE = {
|
||||
"message_id": 12345,
|
||||
"from": USER,
|
||||
"chat": CHAT,
|
||||
"date": 1508768012,
|
||||
"dice": DICE
|
||||
}
|
||||
|
||||
MESSAGE_WITH_DOCUMENT = {
|
||||
"message_id": 12345,
|
||||
"from": USER,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue