diff --git a/CHANGES/1771.misc.rst b/CHANGES/1771.misc.rst new file mode 100644 index 00000000..485dcc1a --- /dev/null +++ b/CHANGES/1771.misc.rst @@ -0,0 +1,3 @@ +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` + +Removed duplicates and added missing tests to markdown_decoration diff --git a/tests/test_utils/test_text_decorations.py b/tests/test_utils/test_text_decorations.py index b4ccb5e8..3563c328 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`"],