🐛 优化对 bilibili cookie 的 mock

This commit is contained in:
2024-10-28 22:06:12 +08:00
parent 0deb406692
commit 42cc56ac24
4 changed files with 22 additions and 22 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ async def test_add_cookie(app: App):
async with app.test_matcher(add_cookie_matcher) as ctx:
bot = ctx.create_bot(base=Bot)
event_1 = fake_private_message_event(
message=Message("添加Cookie"), sender=fake_superuser, to_me=True, user_id=fake_superuser.user_id
message=Message("添加cookie"), sender=fake_superuser, to_me=True, user_id=fake_superuser.user_id
)
ctx.receive_event(bot, event_1)
ctx.should_pass_rule()
+1
View File
@@ -67,6 +67,7 @@ async def test_del_cookie(app: App):
@pytest.mark.usefixtures("_clear_db")
@pytest.mark.usefixtures("_patch_weibo_get_cookie_name")
async def test_del_cookie_err(app: App):
from nonebug_saa import should_send_saa
from nonebot.adapters.onebot.v11.bot import Bot