refactor(api): build a remote session whole, with one login state

This commit is contained in:
imSp4rky
2026-11-24 19:26:26 -07:00
parent 1be56b15b3
commit 43987f9809
21 changed files with 320 additions and 205 deletions
+19
View File
@@ -0,0 +1,19 @@
"""A real remote session entry for the tests that call the session and licence handlers directly."""
from types import SimpleNamespace
from typing import Any
from unshackle.core.api.session_store import SessionEntry
def session_entry(**fields: Any) -> SessionEntry:
"""A remote session that the server CDM licenses, unless *fields* set another :class:`SessionEntry` value."""
return SessionEntry(
**{
"session_id": "sess",
"service_tag": "EXAMPLE",
"service_instance": SimpleNamespace(),
"server_cdm": True,
**fields,
}
)