mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-29 20:45:11 +00:00
test(dash): stub the ffprobe call in the init-segment pssh test so it runs without the binary
This commit is contained in:
@@ -20,7 +20,7 @@ from pywidevine.pssh import PSSH
|
||||
|
||||
from unshackle.core import binaries
|
||||
from unshackle.core.constants import DOWNLOAD_LICENCE_ONLY
|
||||
from unshackle.core.drm import Widevine
|
||||
from unshackle.core.drm import Widevine, cenc
|
||||
from unshackle.core.drm.clearkey_cenc import ClearKeyCENC
|
||||
from unshackle.core.manifests.dash import DASH
|
||||
from unshackle.core.tracks.track import DownloadContext
|
||||
@@ -144,6 +144,7 @@ def test_download_track_prefers_the_init_segment_pssh_over_a_common_pssh(tmp_pat
|
||||
track = DASH.from_text(COMMON_MPD, MANIFEST_URL).to_tracks().videos[0]
|
||||
monkeypatch.setattr(track, "get_key_id", lambda *args, **kwargs: KID)
|
||||
monkeypatch.setattr(binaries, "FFProbe", Path("ffprobe"))
|
||||
monkeypatch.setattr(cenc, "ffprobe", lambda data: {})
|
||||
with_init(monkeypatch, base64.b64decode(PSSH.new(system_id=PSSH.SystemId.Widevine, key_ids=[KID]).dumps()))
|
||||
|
||||
licence = licence_only(track, tmp_path)
|
||||
|
||||
Reference in New Issue
Block a user