mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-03 06:25:10 +00:00
test(conftest): reset the decrypt hook and the licence-only flag that a dl run leaves set
This commit is contained in:
+9
-1
@@ -14,7 +14,8 @@ import pytest
|
||||
from unshackle.core import binaries, console, process_exit
|
||||
from unshackle.core import session as http_session
|
||||
from unshackle.core.config import config
|
||||
from unshackle.core.constants import RunCancel
|
||||
from unshackle.core.constants import DOWNLOAD_LICENCE_ONLY, RunCancel
|
||||
from unshackle.core.drm import verify
|
||||
from unshackle.core.providers import anilist
|
||||
from unshackle.core.proxies.proxy import CATALOGUES
|
||||
from unshackle.core.update_checker import UpdateChecker
|
||||
@@ -100,6 +101,13 @@ def no_filename_replacements(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
monkeypatch.setattr(config, "filename_replacements", {})
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def no_dl_run_state(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
"""Start without the decrypt hook and the licence-only flag that a dl run of an earlier test leaves set."""
|
||||
monkeypatch.setattr(verify, "DECRYPT_HOOK", None)
|
||||
DOWNLOAD_LICENCE_ONLY.clear()
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def no_speed_limit(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
"""Start with no speed limit, so a limit that an earlier test locked cannot block a later one."""
|
||||
|
||||
Reference in New Issue
Block a user