forked from kenzuya/unshackle
test: delete slow, timing-based and redundant tests
This commit is contained in:
@@ -71,12 +71,6 @@ def test_the_create_body_lists_each_plugin_with_its_version_and_device_facts(tmp
|
||||
assert str(tmp_path) not in json.dumps(data["plugins"])
|
||||
|
||||
|
||||
def test_a_client_with_no_local_device_sends_no_device_facts() -> None:
|
||||
data = sent_create(lambda system, quality=None: pytest.fail("a device was loaded"), local_cdm=None)
|
||||
|
||||
assert data["plugins"] == {"example": {"version": "1.0"}, "other": {"version": ""}}
|
||||
|
||||
|
||||
def test_a_plugin_device_that_does_not_load_sends_no_facts(caplog: pytest.LogCaptureFixture) -> None:
|
||||
def broken(system: str, quality: int | None = None) -> Any:
|
||||
raise ValueError("EXAMPLE device file is damaged")
|
||||
@@ -105,12 +99,6 @@ def test_a_malformed_plugin_list_is_refused(plugins: Any) -> None:
|
||||
assert e.value.error_code == APIErrorCode.INVALID_INPUT
|
||||
|
||||
|
||||
def test_an_old_client_sends_no_plugin_list() -> None:
|
||||
assert handlers.client_plugins(None) is None
|
||||
assert handlers.client_plugins({"example": {"version": "1.0"}}) == {"example": {"version": "1.0"}}
|
||||
assert handlers.client_plugins({"example": {"device": {"name": None}}}) == {"example": {"device": {"name": None}}}
|
||||
|
||||
|
||||
def plugin_tracks() -> Tracks:
|
||||
track = Video(
|
||||
id_="vid",
|
||||
@@ -248,11 +236,6 @@ def test_a_client_device_session_gives_the_service_a_stand_in_with_the_client_de
|
||||
assert cdm_for("playready") is None
|
||||
|
||||
|
||||
def test_a_fact_the_client_did_not_send_is_none_on_the_stand_in(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
cdm_for = launched_cdm_for(monkeypatch, Licensor.CLIENT_DEVICE, {"example": {"version": "1.0", "device": {}}})
|
||||
assert cdm_for("example").device_name is None
|
||||
|
||||
|
||||
def test_a_client_device_session_with_no_device_facts_gives_no_plugin_device(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
cdm_for = launched_cdm_for(monkeypatch, Licensor.CLIENT_DEVICE, {"example": {"version": "1.0"}})
|
||||
assert cdm_for("example") is None
|
||||
|
||||
Reference in New Issue
Block a user