test: delete slow, timing-based and redundant tests

This commit is contained in:
imSp4rky
2026-12-05 15:20:05 -07:00
parent 783a2fc185
commit 3a0a74e694
292 changed files with 153 additions and 15174 deletions
-26
View File
@@ -73,16 +73,6 @@ def test_single_account_always_same(accounts):
assert handlers.next_server_profile("SINGLE", None) is None
def test_client_managed_gets_nothing(monkeypatch, accounts):
monkeypatch.setattr(key_policy, "load_service_config", lambda s: {})
monkeypatch.setattr(handlers, "load_full_cdm", lambda *a: None)
monkeypatch.setattr(handlers.Services, "load", staticmethod(lambda s: object()))
built = SimpleNamespace()
monkeypatch.setattr(handlers, "instantiate_service", lambda *a: built)
svc, cookies, cred, _ = launch_session("OTHER", "t", {})
assert (svc, cookies, cred) == (built, None, None)
def test_per_key_gate(accounts, monkeypatch):
class Req:
def __init__(self, key):
@@ -95,11 +85,6 @@ def test_per_key_gate(accounts, monkeypatch):
assert handlers.server_account_for(handlers.request_policy(Req("k2")), "OTHER") is False
def test_rotation_per_region_pool(accounts):
picks = [handlers.next_server_profile("EX", r) for r in ["ca", "gb", "ca", "gb"]]
assert picks == ["ca_main", "eu_box", "shared", "shared"]
def test_server_account_ignores_client_credentials(monkeypatch, accounts):
monkeypatch.setattr(key_policy, "load_service_config", lambda s: {})
monkeypatch.setattr(handlers, "load_full_cdm", lambda *a: None)
@@ -196,17 +181,6 @@ def test_nested_dl_params_reach_the_parent_ctx(monkeypatch):
assert svc.parent_params["exact_lang"] is True
def test_absent_dl_params_fall_back_to_the_dl_defaults(monkeypatch):
svc = _create_with_real_ctx(monkeypatch, {})
selection = {k: svc.parent_params[k] for k in (*DL_DEFAULTS,)}
assert selection == DL_DEFAULTS
def test_an_empty_lang_list_is_kept(monkeypatch):
svc = _create_with_real_ctx(monkeypatch, {"dl_params": {"lang": [], "a_lang": []}})
assert svc.parent_params["lang"] == []
def test_a_service_lang_option_never_gets_the_dl_lang(monkeypatch):
svc = _create_with_real_ctx(monkeypatch, {"dl_params": {"lang": ["en"]}})
assert svc.lang is None