Skip to content

Commit

Permalink
🔖 bump version 2.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyongyu authored Aug 6, 2023
1 parent bc2657b commit ef4bb19
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nonebot-adapter-onebot"
version = "2.2.3"
version = "2.2.4"
description = "OneBot(CQHTTP) adapter for nonebot2"
authors = ["yanyongyu <[email protected]>"]
license = "MIT"
Expand All @@ -25,7 +25,6 @@ nonebot2 = "^2.0.0-beta.3"
typing-extensions = ">=4.0.0,<5.0.0"

[tool.poetry.group.dev.dependencies]
pycln = "^2.1.3"
isort = "^5.10.1"
black = "^23.1.0"
ruff = "^0.0.282"
Expand All @@ -40,7 +39,6 @@ nonebot2 = { git = "https://github.com/nonebot/nonebot2.git", branch = "master",
] }

[tool.pytest.ini_options]
asyncio_mode = "auto"
addopts = "--cov nonebot.adapters.onebot --cov-report term-missing"

[tool.black]
Expand Down
8 changes: 8 additions & 0 deletions tests/v12/test_v12_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ async def test_ws(app: App, endpoints: str):
assert "2345678" not in adapter.bots


@pytest.mark.asyncio
async def test_ws_missing_connect_meta_event(app: App):
endpoints = "/onebot/v12/"

Expand All @@ -104,6 +105,7 @@ async def test_ws_missing_connect_meta_event(app: App):
}


@pytest.mark.asyncio
async def test_ws_duplicate_bot(app: App):
"""测试连接两个相同 id 但协议不同的 bot"""
from nonebot.adapters.onebot.v11 import Adapter
Expand Down Expand Up @@ -161,6 +163,7 @@ async def test_ws_duplicate_bot(app: App):
adapter.bot_disconnect(nonebot.get_bot("0"))


@pytest.mark.asyncio
async def test_http_auth_missing(app: App):
endpoints = "/onebot/v12/"

Expand All @@ -174,6 +177,7 @@ async def test_http_auth_missing(app: App):
assert resp.status_code == 403


@pytest.mark.asyncio
async def test_http_auth_header(app: App):
from nonebot.adapters.onebot.v12 import Adapter

Expand All @@ -197,6 +201,7 @@ async def test_http_auth_header(app: App):
adapter.bot_disconnect(nonebot.get_bot("0"))


@pytest.mark.asyncio
async def test_http_auth_query(app: App):
from nonebot.adapters.onebot.v12 import Adapter

Expand All @@ -219,6 +224,7 @@ async def test_http_auth_query(app: App):
adapter.bot_disconnect(nonebot.get_bot("0"))


@pytest.mark.asyncio
async def test_ws_auth_missing(app: App):
endpoints = "/onebot/v12/"

Expand All @@ -232,6 +238,7 @@ async def test_ws_auth_missing(app: App):
pass


@pytest.mark.asyncio
async def test_ws_auth_header(app: App):
endpoints = "/onebot/v12/"

Expand All @@ -255,6 +262,7 @@ async def test_ws_auth_header(app: App):
assert "0" not in nonebot.get_bots()


@pytest.mark.asyncio
async def test_ws_auth_query(app: App):
endpoints = "/onebot/v12/?access_token=test"

Expand Down

0 comments on commit ef4bb19

Please sign in to comment.