refator: use MessageFactory instead of Message, just a part

This commit is contained in:
Egor 2020-07-03 17:08:37 +05:00
parent e883366dc6
commit 0e005f661c
15 changed files with 54 additions and 143 deletions

View file

@ -4,6 +4,7 @@ import pytest
from aiogram.api.methods import Request, SendMessage
from aiogram.api.types import Chat, Message
from tests.factories.message import MessageFactory
from tests.mocked_bot import MockedBot
@ -13,11 +14,7 @@ class TestSendMessage:
prepare_result = bot.add_result_for(
SendMessage,
ok=True,
result=Message(
message_id=42,
date=datetime.datetime.now(),
text="test",
chat=Chat(id=42, type="private"),
result=MessageFactory(
),
)
@ -31,11 +28,7 @@ class TestSendMessage:
prepare_result = bot.add_result_for(
SendMessage,
ok=True,
result=Message(
message_id=42,
date=datetime.datetime.now(),
text="test",
chat=Chat(id=42, type="private"),
result=MessageFactory(
),
)