mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-03 22:45:09 +00:00
refactor(remote): encode the session create body in run_plan.session_request beside served_plan
This commit is contained in:
@@ -17,8 +17,8 @@ from unshackle.core.dl_options import (
|
||||
DL_OPTIONS,
|
||||
FORWARDED_DL_PARAMS,
|
||||
cast_dl_params,
|
||||
remote_dl_params,
|
||||
)
|
||||
from unshackle.core.run_plan import session_request
|
||||
from unshackle.core.tracks import Audio, Subtitle, Video
|
||||
|
||||
CLI_ONLY = {DL_OPTION_ALIASES.get(name, name) for name, option in DL_OPTIONS.items() if option is None}
|
||||
@@ -127,11 +127,11 @@ def test_every_dl_option_reaches_dl_result():
|
||||
],
|
||||
)
|
||||
def test_the_client_sends_what_it_has_a_value_for(parent_params, sent):
|
||||
assert remote_dl_params(parent_params) == sent
|
||||
assert session_request(parent_params, {})["dl_params"] == sent
|
||||
|
||||
|
||||
def test_no_forwarded_option_has_an_alias():
|
||||
"""remote_dl_params reads the API name from the click context, so an aliased option cannot be forwarded."""
|
||||
"""session_request reads the API name from the click context, so an aliased option cannot be forwarded."""
|
||||
assert not {name for name, _ in FORWARDED_DL_PARAMS} & DL_OPTION_ALIASES.keys()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user