forked from kenzuya/unshackle
test: delete slow, timing-based and redundant tests
This commit is contained in:
@@ -5,7 +5,6 @@ the vault writes, so a remote run never kept the keys it paid for. Keys that cam
|
||||
vault in the first place must not be pushed back.
|
||||
"""
|
||||
|
||||
import threading
|
||||
from types import SimpleNamespace
|
||||
from uuid import UUID
|
||||
|
||||
@@ -100,13 +99,6 @@ def test_a_capped_track_takes_a_local_vault_key_before_the_refusal():
|
||||
assert capped_run(memory_vaults({CACHED: "k_cached"})).content_keys == {CACHED: "k_cached"}
|
||||
|
||||
|
||||
def test_a_capped_track_no_vault_holds_raises_the_refusal():
|
||||
import click
|
||||
|
||||
with pytest.raises(click.ClickException, match="only Widevine DRM, which your local PlayReady CDM cannot license"):
|
||||
capped_run(memory_vaults())
|
||||
|
||||
|
||||
def test_batch_resolved_keys_are_cached_before_download():
|
||||
"""The batch licence fills track.drm before prepare_drm, so dl caches it at the call site."""
|
||||
vaults = memory_vaults()
|
||||
@@ -175,29 +167,6 @@ def test_a_local_vault_key_goes_before_a_batch_server_vault_key():
|
||||
)
|
||||
|
||||
|
||||
def test_tracks_sharing_one_drm_licence_and_push_once():
|
||||
"""Two tracks on the same DRM run at the same time; the second must find the first one's keys."""
|
||||
vaults = memory_vaults()
|
||||
drm = FakeWidevine([NEW])
|
||||
source = MemoryKeySource({NEW: "k_new"})
|
||||
keys = make_resolver(vaults, source)
|
||||
both_started = threading.Barrier(2)
|
||||
|
||||
def track():
|
||||
both_started.wait(10)
|
||||
prepare(keys, drm, NEW)
|
||||
|
||||
threads = [threading.Thread(target=track) for _ in range(2)]
|
||||
for t in threads:
|
||||
t.start()
|
||||
for t in threads:
|
||||
t.join()
|
||||
keys.wait_vault_writes()
|
||||
|
||||
assert len(source.asked) == 1
|
||||
assert vaults.vaults[0].pushes == [{NEW: "k_new"}]
|
||||
|
||||
|
||||
def test_cdm_only_still_reuses_keys_from_the_run_cache():
|
||||
"""--cdm-only skips the vaults, not LICENSE_KEY_CACHE, so a second track with the same KID does not licence twice."""
|
||||
vaults = memory_vaults()
|
||||
|
||||
Reference in New Issue
Block a user