mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 23:47:41 +08:00
refactor: use explicit system config getter
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# pylint: disable=no-name-in-module
|
||||
|
||||
import pytest
|
||||
|
||||
from app.modules.indexer.spider import hddolby as hddolby_module
|
||||
@@ -21,7 +23,7 @@ def _build_indexer() -> dict:
|
||||
@pytest.fixture()
|
||||
def hddolby_spider(monkeypatch):
|
||||
"""构造不依赖真实数据库配置的 HddolbySpider。"""
|
||||
monkeypatch.setattr(hddolby_module, "SystemConfigOper", lambda: None)
|
||||
monkeypatch.setattr(hddolby_module, "get_configured_system_config", lambda: None)
|
||||
return HddolbySpider(_build_indexer())
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user