mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 18:19:34 +00:00
Fixed default LinkPreviewOptions JSON serialization (#1419)
* Fixed default link preview options serialization * Added changelog
This commit is contained in:
parent
eef50a2edb
commit
53849b01a7
3 changed files with 15 additions and 3 deletions
|
|
@ -26,7 +26,7 @@ from aiogram.exceptions import (
|
|||
TelegramUnauthorizedError,
|
||||
)
|
||||
from aiogram.methods import DeleteMessage, GetMe, TelegramMethod
|
||||
from aiogram.types import UNSET_PARSE_MODE, User
|
||||
from aiogram.types import UNSET_PARSE_MODE, User, LinkPreviewOptions
|
||||
from aiogram.types.base import UNSET_DISABLE_WEB_PAGE_PREVIEW, UNSET_PROTECT_CONTENT
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
|
|
@ -111,6 +111,10 @@ class TestBaseSession:
|
|||
),
|
||||
"1494994302",
|
||||
],
|
||||
[
|
||||
{"link_preview": LinkPreviewOptions(is_disabled=True)},
|
||||
'{"link_preview": {"is_disabled": true}}',
|
||||
],
|
||||
],
|
||||
)
|
||||
def test_prepare_value(self, value: Any, result: str, bot: MockedBot):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue