mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-05 11:26:43 +08:00
add more test
This commit is contained in:
parent
eddc226a4f
commit
24bf9de208
@ -72,6 +72,22 @@ async def test_send_merge_no_queue(app: App):
|
|||||||
async with app.test_api() as ctx:
|
async with app.test_api() as ctx:
|
||||||
bot = ctx.create_bot(base=Bot, self_id="8888")
|
bot = ctx.create_bot(base=Bot, self_id="8888")
|
||||||
assert isinstance(bot, Bot)
|
assert isinstance(bot, Bot)
|
||||||
|
message = [
|
||||||
|
Message(MessageSegment.text("test msg")),
|
||||||
|
Message(MessageSegment.image("https://picsum.photos/200/300")),
|
||||||
|
]
|
||||||
|
ctx.should_call_api(
|
||||||
|
"send_group_msg",
|
||||||
|
{"group_id": 633, "message": Message(MessageSegment.text("test msg"))},
|
||||||
|
None,
|
||||||
|
)
|
||||||
|
ctx.should_call_api(
|
||||||
|
"send_group_msg",
|
||||||
|
{"group_id": 633, "message": message[1]},
|
||||||
|
None,
|
||||||
|
)
|
||||||
|
await send_msgs(bot, 633, "group", message)
|
||||||
|
|
||||||
message = [
|
message = [
|
||||||
Message(MessageSegment.text("test msg")),
|
Message(MessageSegment.text("test msg")),
|
||||||
Message(MessageSegment.image("https://picsum.photos/200/300")),
|
Message(MessageSegment.image("https://picsum.photos/200/300")),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user