forked from kenzuya/unshackle
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:
@@ -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"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user