rename bison_theme_use_browser -> bison_use_browser

This commit is contained in:
felinae98
2024-05-06 19:12:46 +08:00
parent d8f48fc490
commit cf50e9f288
9 changed files with 13 additions and 11 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ async def app(tmp_path: Path, request: pytest.FixtureRequest, mocker: MockerFixt
plugin_config.bison_config_path = str(tmp_path / "legacy_config")
plugin_config.bison_filter_log = False
plugin_config.bison_theme_use_browser = True
plugin_config.bison_use_browser = True
datastore_config.datastore_config_dir = tmp_path / "config"
datastore_config.datastore_cache_dir = tmp_path / "cache"
+1 -1
View File
@@ -188,7 +188,7 @@ async def test_generate_msg(mock_platform):
res1 = await post.generate()
assert isinstance(res1[0], Image)
plugin_config.bison_theme_use_browser = False
plugin_config.bison_use_browser = False
res3 = await post.generate()
assert res3[0]
+2 -2
View File
@@ -122,7 +122,7 @@ async def test_theme_need_browser(app: App, mock_post):
async def test_theme_no_enable_use_browser(app: App, mock_post):
from nonebot_bison.plugin_config import plugin_config
plugin_config.bison_theme_use_browser = False
plugin_config.bison_use_browser = False
from nonebot_bison.theme import Theme, ThemeRenderUnsupportError, theme_manager
@@ -140,7 +140,7 @@ async def test_theme_no_enable_use_browser(app: App, mock_post):
await theme.do_render(mock_post)
theme_manager.unregister(theme.name)
plugin_config.bison_theme_use_browser = True
plugin_config.bison_use_browser = True
@pytest.mark.asyncio