From 6e53c6f4b2d792f88a89458e241c81a888e11bc3 Mon Sep 17 00:00:00 2001 From: suyiiyii Date: Mon, 28 Oct 2024 22:48:11 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BC=98=E5=8C=96=E5=AF=B9=20bilibili?= =?UTF-8?q?=20cookie=20=E7=9A=84=20mock?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/scheduler/test_site.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/scheduler/test_site.py b/tests/scheduler/test_site.py index fbcb465..cf1e268 100644 --- a/tests/scheduler/test_site.py +++ b/tests/scheduler/test_site.py @@ -5,6 +5,8 @@ from unittest.mock import AsyncMock from nonebug import App from pytest_mock import MockerFixture +from tests.conftest import patch_refresh_bilibili_anonymous_cookie + if typing.TYPE_CHECKING: from nonebot_bison.utils import Site @@ -199,6 +201,7 @@ async def test_scheduler_skip_browser(mocker: MockerFixture): site = MockSite mocker.patch.dict(platform_manager, {"mock_platform": MockPlatform}) + patch_refresh_bilibili_anonymous_cookie(mocker) await init_scheduler() @@ -229,6 +232,7 @@ async def test_scheduler_no_skip_not_require_browser(mocker: MockerFixture): site = MockSite mocker.patch.dict(platform_manager, {"mock_platform": MockPlatform}) + patch_refresh_bilibili_anonymous_cookie(mocker) await init_scheduler()