Update tests. Added missing files.

This commit is contained in:
Alex Root Junior 2022-08-14 15:53:20 +03:00
parent 4e0af00b73
commit f5de712fcc
No known key found for this signature in database
GPG key ID: 074C1D455EBEA4AC
6 changed files with 115 additions and 8 deletions

View file

@ -50,7 +50,12 @@ class TestTextDecoration:
[
html_decoration,
MessageEntity(type="spoiler", offset=0, length=5),
'<span class="tg-spoiler">test</span>',
"<tg-spoiler>test</tg-spoiler>",
],
[
html_decoration,
MessageEntity(type="custom_emoji", offset=0, length=5, custom_emoji_id="42"),
'<tg-emoji emoji-id="42">test</tg-emoji>',
],
[
html_decoration,
@ -82,6 +87,11 @@ class TestTextDecoration:
[markdown_decoration, MessageEntity(type="email", offset=0, length=5), "test"],
[markdown_decoration, MessageEntity(type="phone_number", offset=0, length=5), "test"],
[markdown_decoration, MessageEntity(type="spoiler", offset=0, length=5), "|test|"],
[
markdown_decoration,
MessageEntity(type="custom_emoji", offset=0, length=5, custom_emoji_id="42"),
"[test](tg://emoji?id=42)",
],
[
markdown_decoration,
MessageEntity(