mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2026-05-09 18:27:56 +08:00
🐛 不使用 updateAt 作为 Arknights 公告的 get_date 返回值
This commit is contained in:
@@ -41,6 +41,27 @@ def monster_siren_list_1():
|
||||
return get_json("monster-siren_list_1.json")
|
||||
|
||||
|
||||
@pytest.mark.asyncio()
|
||||
async def test_get_date_in_bulletin(app: App):
|
||||
from nonebot_bison.utils import ProcessContext
|
||||
from nonebot_bison.platform.arknights import Arknights, BulletinListItem
|
||||
|
||||
arknights = Arknights(ProcessContext(), AsyncClient())
|
||||
assert (
|
||||
arknights.get_date(
|
||||
BulletinListItem(
|
||||
cid="1",
|
||||
title="",
|
||||
category=1,
|
||||
displayTime="",
|
||||
updatedAt=1627036800,
|
||||
sticky=False,
|
||||
)
|
||||
)
|
||||
is None
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.asyncio()
|
||||
@respx.mock
|
||||
async def test_fetch_new(
|
||||
|
||||
Reference in New Issue
Block a user