mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
fix: remove direct creation of Message instances
This commit is contained in:
parent
5a561ea5a3
commit
54ab659a6d
2 changed files with 15 additions and 103 deletions
|
|
@ -45,6 +45,7 @@ from aiogram.api.types import (
|
|||
)
|
||||
from aiogram.api.types.message import ContentType, Message
|
||||
from tests.factories.chat import ChatFactory
|
||||
from tests.factories.message import MessageFactory
|
||||
from tests.factories.user import UserFactory
|
||||
|
||||
|
||||
|
|
@ -53,12 +54,7 @@ class TestMessage:
|
|||
"message,content_type",
|
||||
[
|
||||
[
|
||||
Message(
|
||||
message_id=42,
|
||||
date=datetime.datetime.now(),
|
||||
text="test",
|
||||
chat=ChatFactory(),
|
||||
from_user=UserFactory(),
|
||||
MessageFactory(
|
||||
),
|
||||
ContentType.TEXT,
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue