refactor(api): move server key resolution into server_keys and name the tracks reply's DRM system from the licence order

This commit is contained in:
imSp4rky
2026-11-29 11:12:15 -07:00
parent 6758d9e4fa
commit 1571236991
27 changed files with 1233 additions and 958 deletions
+2 -2
View File
@@ -6,6 +6,7 @@ from typing import Any
import pytest
from unshackle.core import vaults as vaults_module
from unshackle.core.api import server_keys
from unshackle.core.config import config
from unshackle.core.vaults import load_config_vaults
@@ -96,12 +97,11 @@ def test_only_a_decrypt_labs_vault_takes_the_global_key(monkeypatch: pytest.Monk
def test_server_vaults_read_the_global_decrypt_labs_key(monkeypatch: pytest.MonkeyPatch) -> None:
from unshackle.core.api import handlers
monkeypatch.setattr(config, "decrypt_labs_api_key", "global")
monkeypatch.setattr(config, "key_vaults", [{"type": "API", "name": "decrypt_labs"}, {"type": "Missing"}])
vaults = handlers.load_server_vaults("EXAMPLE")
vaults = server_keys.load_server_vaults("EXAMPLE")
assert [v.kwargs.get("token") for v in vaults] == ["global"]