fix test

This commit is contained in:
felinae98 2022-11-24 14:29:04 +08:00
parent 2f8abc1c1d
commit 0d73d74287

View File

@ -32,7 +32,7 @@ async def test_send_no_queue(app: App):
async def test_send_queue(app: App): async def test_send_queue(app: App):
import nonebot import nonebot
from nonebot.adapters.onebot.v11.bot import Bot from nonebot.adapters.onebot.v11.bot import Bot
from nonebot.adapters.onebot.v11.message import Message from nonebot.adapters.onebot.v11.message import Message, MessageSegment
from nonebot_bison import send from nonebot_bison import send
from nonebot_bison.plugin_config import plugin_config from nonebot_bison.plugin_config import plugin_config
from nonebot_bison.send import do_send_msgs, send_msgs from nonebot_bison.send import do_send_msgs, send_msgs
@ -50,7 +50,9 @@ async def test_send_queue(app: App):
await bot.call_api("send_group_msg", group_id="1233", message="test msg") await bot.call_api("send_group_msg", group_id="1233", message="test msg")
await send_msgs(bot, "1233", "group", [Message("msg")]) await send_msgs(bot, "1233", "group", [Message("msg")])
ctx.should_call_api( ctx.should_call_api(
"send_group_msg", {"group_id": "1233", "message": "msg"}, True "send_group_msg",
{"group_id": "1233", "message": [MessageSegment.text("msg")]},
True,
) )
await do_send_msgs() await do_send_msgs()
assert not ctx.wait_list.empty() assert not ctx.wait_list.empty()