fix(remote): end a remote session from before its create to after its DELETE

This commit is contained in:
imSp4rky
2026-11-30 13:56:59 -07:00
parent 3634fc5686
commit 34a3820eb8
34 changed files with 1719 additions and 276 deletions
@@ -12,7 +12,7 @@ import pytest
import responses
from tests.core.test_music_renderer import OWN_FACTS, OWN_ROWS, header, mixed
from tests.remote.sessions import session_entry
from tests.remote.sessions import hold_session, session_entry
from tests.remote.unit.test_session_reopen import SERVER, make_service
from unshackle.core.api import handlers
from unshackle.core.remote_service import RemoteError, RemoteService
@@ -144,7 +144,7 @@ def test_the_title_map_keeps_the_facts(monkeypatch: pytest.MonkeyPatch) -> None:
def test_a_reopened_session_keeps_the_facts(monkeypatch: pytest.MonkeyPatch) -> None:
client = client_of(titles_reply(monkeypatch, served(mixed(**FACTS))))
client.get_titles()
monkeypatch.setattr(client, "authenticate", lambda credential=None: setattr(client, "_session_id", "s2"))
monkeypatch.setattr(client, "authenticate", lambda credential=None: hold_session(client, "s2"))
responses.add(responses.GET, f"{SERVER}/api/health", json={"status": "ok", "draining": False})
responses.add(
responses.GET,