mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-09 09:22:03 +00:00
Add middlewares (API + Docs + Tests)
This commit is contained in:
parent
e4cd4c1763
commit
5b6ec599b1
24 changed files with 1120 additions and 42 deletions
|
|
@ -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],
|
||||
[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue