mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-30 13:05:08 +00:00
21 lines
710 B
Python
21 lines
710 B
Python
"""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
|
|
from unshackle.core.remote_protocol import LicensingMode, Licensor
|
|
|
|
|
|
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(),
|
|
"licensing": LicensingMode(Licensor.SERVER_CDM),
|
|
**fields,
|
|
}
|
|
)
|