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:
@@ -25,9 +25,8 @@ def runner() -> dl:
|
||||
|
||||
@pytest.mark.parametrize("cdm_only, vaults_only, best_available", [(True, False, False), (False, True, True)])
|
||||
def test_the_resolver_takes_the_run_flags_and_becomes_the_decrypt_hook(
|
||||
monkeypatch: pytest.MonkeyPatch, cdm_only: bool, vaults_only: bool, best_available: bool
|
||||
cdm_only: bool, vaults_only: bool, best_available: bool
|
||||
) -> None:
|
||||
monkeypatch.setattr(verify, "DECRYPT_HOOK", None)
|
||||
writer = create_autospec(ExportWriter, instance=True)
|
||||
cmd = runner()
|
||||
service = SimpleNamespace()
|
||||
@@ -50,8 +49,7 @@ def test_the_resolver_takes_the_run_flags_and_becomes_the_decrypt_hook(
|
||||
writer.record.assert_called_once_with("title", "track", "drm")
|
||||
|
||||
|
||||
def test_no_export_gives_no_export_callback(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
monkeypatch.setattr(verify, "DECRYPT_HOOK", None)
|
||||
def test_no_export_gives_no_export_callback() -> None:
|
||||
cmd = runner()
|
||||
|
||||
cmd.start_key_resolution(SimpleNamespace(), cdm_only=False, vaults_only=True, best_available=False, export=None)
|
||||
|
||||
Reference in New Issue
Block a user