refator: use MessageFactory instead of Message, just a part

This commit is contained in:
Egor 2020-07-03 17:08:55 +05:00
parent 0e005f661c
commit 5a561ea5a3
13 changed files with 37 additions and 78 deletions

View file

@ -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