mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
* Add set_chat_member_tag shortcut coverage * Add set_member_tag shortcut tests and align decoration expectations * Fix follow-up test coverage for sender_tag and can_edit_tag * Add changelog fragment for PR 1781 * Align changelog with base PR #1780 * Expand 1780 changelog to cover base and follow-up scope * Treat sender_tag as metadata, not message content type --------- Co-authored-by: Latand <latand@users.noreply.github.com> Co-authored-by: Codex Agent <codex@openclaw.local>
This commit is contained in:
parent
251df4b193
commit
ebfab22d64
13 changed files with 202 additions and 8 deletions
|
|
@ -25,7 +25,7 @@ class TestTextDecoration:
|
|||
[
|
||||
html_decoration,
|
||||
MessageEntity(type="pre", offset=0, length=5, language="python"),
|
||||
'<pre><code class="language-python">test</code></pre>',
|
||||
'<pre><code language="language-python">test</code></pre>',
|
||||
],
|
||||
[html_decoration, MessageEntity(type="underline", offset=0, length=5), "<u>test</u>"],
|
||||
[
|
||||
|
|
@ -57,7 +57,7 @@ class TestTextDecoration:
|
|||
[
|
||||
html_decoration,
|
||||
MessageEntity(type="custom_emoji", offset=0, length=5, custom_emoji_id="42"),
|
||||
'<tg-emoji emoji-id="42">test</tg-emoji>',
|
||||
'<tg-emoji emoji_id="42">test</tg-emoji>',
|
||||
],
|
||||
[
|
||||
html_decoration,
|
||||
|
|
@ -74,6 +74,17 @@ class TestTextDecoration:
|
|||
MessageEntity(type="expandable_blockquote", offset=0, length=5),
|
||||
"<blockquote expandable>test</blockquote>",
|
||||
],
|
||||
[
|
||||
html_decoration,
|
||||
MessageEntity(
|
||||
type="date_time",
|
||||
offset=0,
|
||||
length=5,
|
||||
unix_time=42,
|
||||
date_time_format="yMd",
|
||||
),
|
||||
'<tg-time unix="42" format="yMd">test</tg-time>',
|
||||
],
|
||||
[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`"],
|
||||
|
|
@ -102,7 +113,7 @@ class TestTextDecoration:
|
|||
[
|
||||
markdown_decoration,
|
||||
MessageEntity(type="custom_emoji", offset=0, length=5, custom_emoji_id="42"),
|
||||
"",
|
||||
"",
|
||||
],
|
||||
[
|
||||
markdown_decoration,
|
||||
|
|
@ -124,6 +135,17 @@ class TestTextDecoration:
|
|||
MessageEntity(type="expandable_blockquote", offset=0, length=5),
|
||||
">test||",
|
||||
],
|
||||
[
|
||||
markdown_decoration,
|
||||
MessageEntity(
|
||||
type="date_time",
|
||||
offset=0,
|
||||
length=5,
|
||||
unix_time=42,
|
||||
date_time_format="yMd",
|
||||
),
|
||||
"",
|
||||
],
|
||||
],
|
||||
)
|
||||
def test_apply_single_entity(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue