mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
refator: use MessageFactory instead of Message, just a part
This commit is contained in:
parent
0e005f661c
commit
5a561ea5a3
13 changed files with 37 additions and 78 deletions
|
|
@ -14,9 +14,7 @@ class TestSendDocument:
|
|||
prepare_result = bot.add_result_for(
|
||||
SendDocument,
|
||||
ok=True,
|
||||
result=MessageFactory(
|
||||
document=Document(file_id="file id", file_unique_id="file id"),
|
||||
),
|
||||
result=MessageFactory(document=Document(file_id="file id", file_unique_id="file id")),
|
||||
)
|
||||
|
||||
response: Message = await SendDocument(chat_id=private_chat.id, document="file id")
|
||||
|
|
@ -29,9 +27,7 @@ class TestSendDocument:
|
|||
prepare_result = bot.add_result_for(
|
||||
SendDocument,
|
||||
ok=True,
|
||||
result=MessageFactory(
|
||||
document=Document(file_id="file id", file_unique_id="file id"),
|
||||
),
|
||||
result=MessageFactory(document=Document(file_id="file id", file_unique_id="file id")),
|
||||
)
|
||||
|
||||
response: Message = await bot.send_document(chat_id=private_chat.id, document="file id")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue