mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-07 12:23:00 +08:00
⬆️ upgrade to latest nonebot
This commit is contained in:
parent
a57f2aa21e
commit
271bd1f1b9
@ -21,7 +21,7 @@ classifiers = [
|
|||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = ">=3.10,<4.0.0"
|
python = ">=3.10,<4.0.0"
|
||||||
nonebot2 = ">=2.0.0-rc.2"
|
nonebot2 = "^2.0.0-rc.4"
|
||||||
httpx = ">=0.16.1"
|
httpx = ">=0.16.1"
|
||||||
bs4 = "^0.0.1"
|
bs4 = "^0.0.1"
|
||||||
tinydb = "^4.3.0"
|
tinydb = "^4.3.0"
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
import pytest
|
import pytest
|
||||||
from nonebug import App
|
from nonebug import App
|
||||||
|
|
||||||
from .utils import AppReq
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
@pytest.mark.parametrize("app", [{"refresh_bot": True}], indirect=True)
|
@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:
|
async with app.test_api() as ctx:
|
||||||
botv11 = ctx.create_bot(base=BotV11, self_id="v11")
|
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 = get_driver()
|
||||||
driver._bots = {botv11.self_id: botv11, botv12.self_id: botv12}
|
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:
|
async with app.test_api() as ctx:
|
||||||
botv11 = ctx.create_bot(base=BotV11, self_id="v11")
|
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 = get_driver()
|
||||||
driver._bots = {botv11.self_id: botv11, botv12.self_id: botv12}
|
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:
|
async with app.test_api() as ctx:
|
||||||
bot1 = ctx.create_bot(base=BotV11, self_id="1")
|
bot1 = ctx.create_bot(base=BotV11, self_id="1")
|
||||||
bot2 = ctx.create_bot(base=BotV11, self_id="2")
|
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 = get_driver()
|
||||||
driver._bots = {bot1.self_id: bot1, bot2.self_id: bot2, botv12.self_id: botv12}
|
driver._bots = {bot1.self_id: bot1, bot2.self_id: bot2, botv12.self_id: botv12}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user