mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-06 07:55:10 +00:00
test: delete slow, timing-based and redundant tests
This commit is contained in:
@@ -53,10 +53,6 @@ def keep(monkeypatch):
|
||||
monkeypatch.setattr(config, "continue_downloads", True)
|
||||
|
||||
|
||||
def test_identical_inputs_identical_digest():
|
||||
assert fingerprint(MPD, SEGMENTS) == fingerprint(MPD, SEGMENTS)
|
||||
|
||||
|
||||
def test_rotating_query_token_ignored():
|
||||
tokenised = [(f"{url}?token=abc123&expires=999", rng) for url, rng in SEGMENTS]
|
||||
assert fingerprint(f"{MPD}?auth=xyz", tokenised) == fingerprint(MPD, SEGMENTS)
|
||||
@@ -67,15 +63,6 @@ def test_changed_byte_range_changes_digest():
|
||||
assert fingerprint(MPD, changed) != fingerprint(MPD, SEGMENTS)
|
||||
|
||||
|
||||
def test_changed_segment_count_changes_digest():
|
||||
assert fingerprint(MPD, SEGMENTS[:2]) != fingerprint(MPD, SEGMENTS)
|
||||
|
||||
|
||||
def test_changed_url_path_changes_digest():
|
||||
moved = [("https://cdn/other.mp4", rng) for _, rng in SEGMENTS]
|
||||
assert fingerprint(MPD, moved) != fingerprint(MPD, SEGMENTS)
|
||||
|
||||
|
||||
def test_query_carried_identity_is_not_collapsed():
|
||||
a = [("https://cdn/seg?t=0", None), ("https://cdn/seg?t=100", None)]
|
||||
b = [("https://cdn/seg?t=0", None), ("https://cdn/seg?t=200", None)]
|
||||
@@ -219,11 +206,6 @@ def test_complete_removes_the_directory_and_sidecar(tmp_path, keep):
|
||||
store.complete()
|
||||
|
||||
|
||||
def test_sidecar_is_never_inside_save_dir(tmp_path):
|
||||
store = make_store(tmp_path)
|
||||
assert store.sidecar.parent == store.save_dir.parent
|
||||
|
||||
|
||||
def test_open_keeps_decrypted_segments_only_for_the_same_keys(tmp_path, keep):
|
||||
keys = DownloadMode(segment_keys=KEY_ARGS)
|
||||
store = make_store(tmp_path)
|
||||
|
||||
Reference in New Issue
Block a user