Skip to content

Commit 3239b66

Browse files
committed
🐛 fix version 0.55.0
fix tests
1 parent cc87755 commit 3239b66

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ci:
77
autoupdate_commit_msg: ":arrow_up: auto update by pre-commit hooks"
88
repos:
99
- repo: https://github.com/pycqa/isort
10-
rev: 6.0.0
10+
rev: 5.13.2
1111
hooks:
1212
- id: isort
1313
stages: [pre-commit]

tests/fake.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class FakeEvent(_fake):
137137
sn: int = 1
138138
type: str = "message-created"
139139
login: Login = Login(
140-
sn="123456789",
140+
sn=0,
141141
adapter="test",
142142
status=LoginStatus.ONLINE,
143143
platform="satori",
@@ -187,7 +187,7 @@ def fake_satori_bot_params(self_id: str = "test", platform: str = "test") -> dic
187187
return {
188188
"self_id": self_id,
189189
"login": Login(
190-
sn=self_id,
190+
sn=0,
191191
adapter="test",
192192
status=LoginStatus.ONLINE,
193193
platform=platform,

tests/test_buttons.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,7 @@ async def _(row: int):
9595
)
9696

9797
async with app.test_matcher(matcher) as ctx:
98-
from nonebot.adapters.qq.models import (
99-
Action,
100-
)
98+
from nonebot.adapters.qq.models import Action
10199
from nonebot.adapters.qq.models import Button as QQButton
102100
from nonebot.adapters.qq import Bot, Adapter, Message, MessageSegment
103101
from nonebot.adapters.qq.models import (

tests/test_qq.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
from nonebug import App
33
from arclet.alconna import Args, Alconna
44
from nonebot import on_message, get_adapter
5-
from nonebot.adapters.qq.models import (
6-
Action,
7-
)
5+
from nonebot.adapters.qq.models import Action
86
from nonebot.adapters.qq.models import Button as QQButton
97
from nonebot.adapters.qq import Bot, Adapter, Message, MessageSegment
108
from nonebot.adapters.qq.models import (
@@ -40,7 +38,6 @@ async def _():
4038
bot = ctx.create_bot(base=Bot, adapter=adapter, bot_info=None)
4139
event = fake_message_event_guild(message=Message("<@5678> test aaaa"), id="123")
4240
ctx.receive_event(bot, event)
43-
ctx.should_call_send(event, "check running")
4441
ctx.should_call_send(event, "test!")
4542
ctx.should_finished()
4643

0 commit comments

Comments
 (0)