Fixed text decorations

This commit is contained in:
JRoot Junior 2023-12-30 19:22:06 +02:00
parent 2051457770
commit 76bddb0824
No known key found for this signature in database
GPG key ID: 738964250D5FF6E2
2 changed files with 11 additions and 0 deletions

View file

@ -66,6 +66,11 @@ class TestTextDecoration:
MessageEntity(type="text_link", offset=0, length=5, url="https://aiogram.dev"),
'<a href="https://aiogram.dev">test</a>',
],
[
html_decoration,
MessageEntity(type="blockquote", offset=0, length=5),
"<blockquote>test</blockquote>",
],
[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`"],
@ -106,6 +111,11 @@ class TestTextDecoration:
),
"[test](tg://user?id=42)",
],
[
markdown_decoration,
MessageEntity(type="blockquote", offset=0, length=5),
"> test",
],
],
)
def test_apply_single_entity(