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
|
|
@ -11,12 +11,7 @@ from tests.mocked_bot import MockedBot
|
|||
class TestForwardMessage:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot, private_chat: Chat):
|
||||
prepare_result = bot.add_result_for(
|
||||
ForwardMessage,
|
||||
ok=True,
|
||||
result=MessageFactory(
|
||||
),
|
||||
)
|
||||
prepare_result = bot.add_result_for(ForwardMessage, ok=True, result=MessageFactory())
|
||||
|
||||
response: Message = await ForwardMessage(
|
||||
chat_id=private_chat.id, from_chat_id=private_chat.id, message_id=42
|
||||
|
|
@ -28,12 +23,7 @@ class TestForwardMessage:
|
|||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot, private_chat: Chat):
|
||||
prepare_result = bot.add_result_for(
|
||||
ForwardMessage,
|
||||
ok=True,
|
||||
result=MessageFactory(
|
||||
),
|
||||
)
|
||||
prepare_result = bot.add_result_for(ForwardMessage, ok=True, result=MessageFactory())
|
||||
|
||||
response: Message = await bot.forward_message(
|
||||
chat_id=private_chat.id, from_chat_id=private_chat.id, message_id=42
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue