From f5b8fb458078726dd736109d865c529c333bd296 Mon Sep 17 00:00:00 2001 From: K1rL3s Date: Sun, 15 Feb 2026 07:32:33 +0300 Subject: [PATCH] feat: Add tests for `markdown_decoration` with `MessageEntity(type="text_link")` The tests for `text_decorations` duplicated the tests for `html_markdown` with `type="url"` and `type="text_link"`, but there were no such tests for `markdown_decoration` --- tests/test_utils/test_text_decorations.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_utils/test_text_decorations.py b/tests/test_utils/test_text_decorations.py index b4ccb5e8..c75620d2 100644 --- a/tests/test_utils/test_text_decorations.py +++ b/tests/test_utils/test_text_decorations.py @@ -48,7 +48,6 @@ class TestTextDecoration: ), 'test', ], - [html_decoration, MessageEntity(type="url", offset=0, length=5), "test"], [ html_decoration, MessageEntity(type="spoiler", offset=0, length=5), @@ -59,11 +58,6 @@ class TestTextDecoration: MessageEntity(type="custom_emoji", offset=0, length=5, custom_emoji_id="42"), 'test', ], - [ - html_decoration, - MessageEntity(type="text_link", offset=0, length=5, url="https://aiogram.dev"), - 'test', - ], [ html_decoration, MessageEntity(type="blockquote", offset=0, length=5), @@ -74,6 +68,12 @@ class TestTextDecoration: MessageEntity(type="expandable_blockquote", offset=0, length=5), "
test
", ], + [markdown_decoration, MessageEntity(type="url", offset=0, length=5), "test"], + [ + markdown_decoration, + MessageEntity(type="text_link", offset=0, length=5, url="https://aiogram.dev"), + "[test](https://aiogram.dev)" + ], [markdown_decoration, MessageEntity(type="bold", offset=0, length=5), "*test*"], [markdown_decoration, MessageEntity(type="italic", offset=0, length=5), "_\rtest_\r"], [markdown_decoration, MessageEntity(type="code", offset=0, length=5), "`test`"],