Add middlewares (API + Docs + Tests)

This commit is contained in:
Alex Root Junior 2020-04-12 20:27:32 +03:00
parent e4cd4c1763
commit 5b6ec599b1
24 changed files with 1120 additions and 42 deletions

View file

@ -7,6 +7,7 @@ from aiogram.api.methods import (
SendAnimation,
SendAudio,
SendContact,
SendDice,
SendDocument,
SendGame,
SendInvoice,
@ -26,6 +27,7 @@ from aiogram.api.types import (
Audio,
Chat,
Contact,
Dice,
Document,
EncryptedCredentials,
Game,
@ -391,6 +393,16 @@ class TestMessage:
),
ContentType.POLL,
],
[
Message(
message_id=42,
date=datetime.datetime.now(),
chat=Chat(id=42, type="private"),
dice=Dice(value=6),
from_user=User(id=42, is_bot=False, first_name="Test"),
),
ContentType.DICE,
],
[
Message(
message_id=42,
@ -431,6 +443,7 @@ class TestMessage:
["", dict(text="test"), SendMessage],
["photo", dict(photo="photo"), SendPhoto],
["poll", dict(question="Q?", options=[]), SendPoll],
["dice", dict(), SendDice],
["sticker", dict(sticker="sticker"), SendSticker],
["sticker", dict(sticker="sticker"), SendSticker],
[