From 488db8f475b468f64245d8b89995006276b98a90 Mon Sep 17 00:00:00 2001 From: Azide Date: Thu, 28 Dec 2023 23:40:37 +0800 Subject: [PATCH] =?UTF-8?q?:white=5Fcheck=5Fmark:=20=E6=B7=BB=E5=8A=A0Repl?= =?UTF-8?q?y=E7=9A=84=5F=5Fstr=5F=5F,=20=5F=5Frepr=5F=5F=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_message.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/test_message.py b/tests/test_message.py index 2ddd531..f086cdc 100644 --- a/tests/test_message.py +++ b/tests/test_message.py @@ -37,13 +37,12 @@ def test_message_segment_to_str(): assert str(i_bytesio) == f"[SAA:Image|name='image',image=]" assert repr(i_bytesio) == "Image(name='image', image=BytesIO(b'123'))" - # FIXME: Reply还不支持 - # r = Reply(MessageId(adapter_name=SupportedAdapters.fake)) - # assert r.get("data").get("message_id") == MessageId( - # adapter_name=SupportedAdapters.fake - # ) - # assert str(r) == "[SAA:Reply|message_id=MessageId(adapter_name='fake')]" - # assert repr(r) == "Reply(message_id=MessageId(adapter_name='fake'))" + r = Reply(MessageId(adapter_name=SupportedAdapters.fake)) + assert r.get("data").get("message_id") == MessageId( + adapter_name=SupportedAdapters.fake + ) + assert str(r).startswith("[SAA:Reply|message_id=MessageId(adapter_name=") + assert repr(r).startswith("Reply(message_id=MessageId(adapter_name=") m = Mention("123") assert m.get("data").get("user_id") == "123"