⬆️ upgrade to latest nonebot

This commit is contained in:
felinae98 2023-04-03 18:36:20 +08:00
parent a57f2aa21e
commit 271bd1f1b9
2 changed files with 4 additions and 6 deletions

View File

@ -21,7 +21,7 @@ classifiers = [
[tool.poetry.dependencies]
python = ">=3.10,<4.0.0"
nonebot2 = ">=2.0.0-rc.2"
nonebot2 = "^2.0.0-rc.4"
httpx = ">=0.16.1"
bs4 = "^0.0.1"
tinydb = "^4.3.0"

View File

@ -1,8 +1,6 @@
import pytest
from nonebug import App
from .utils import AppReq
@pytest.mark.asyncio
@pytest.mark.parametrize("app", [{"refresh_bot": True}], indirect=True)
@ -15,7 +13,7 @@ async def test_get_bots(app: App) -> None:
async with app.test_api() as ctx:
botv11 = ctx.create_bot(base=BotV11, self_id="v11")
botv12 = ctx.create_bot(base=BotV12, self_id="v12", platform="qq")
botv12 = ctx.create_bot(base=BotV12, self_id="v12", platform="qq", impl="walle")
driver = get_driver()
driver._bots = {botv11.self_id: botv11, botv12.self_id: botv12}
@ -38,7 +36,7 @@ async def test_refresh_bots(app: App) -> None:
async with app.test_api() as ctx:
botv11 = ctx.create_bot(base=BotV11, self_id="v11")
botv12 = ctx.create_bot(base=BotV12, self_id="v12", platform="qq")
botv12 = ctx.create_bot(base=BotV12, self_id="v12", platform="qq", impl="walle")
driver = get_driver()
driver._bots = {botv11.self_id: botv11, botv12.self_id: botv12}
@ -75,7 +73,7 @@ async def test_get_bot_two_bots(app: App) -> None:
async with app.test_api() as ctx:
bot1 = ctx.create_bot(base=BotV11, self_id="1")
bot2 = ctx.create_bot(base=BotV11, self_id="2")
botv12 = ctx.create_bot(base=BotV12, self_id="v12", platform="qq")
botv12 = ctx.create_bot(base=BotV12, self_id="v12", platform="qq", impl="walle")
driver = get_driver()
driver._bots = {bot1.self_id: bot1, bot2.self_id: bot2, botv12.self_id: botv12}