mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-13 08:52:02 +00:00
test: check both orders of a custom handler and a video entry under one name
This commit is contained in:
parent
a278d6939d
commit
bb7a2fda8f
1 changed files with 7 additions and 4 deletions
|
|
@ -2365,14 +2365,17 @@ def test_completion_passes_vector_store_params_to_custom_handler(
|
|||
assert received_params.items() >= vector_store_params.items()
|
||||
|
||||
|
||||
def test_completion_passes_vector_store_params_to_custom_handler_listed_after_other_entries(
|
||||
monkeypatch: pytest.MonkeyPatch,
|
||||
@pytest.mark.parametrize(
|
||||
"shared_name_handlers",
|
||||
((OpenAIVideoConfig(), OptionalParamsEchoHandler()), (OptionalParamsEchoHandler(), OpenAIVideoConfig())),
|
||||
)
|
||||
def test_completion_passes_vector_store_params_to_custom_handler_among_other_map_entries(
|
||||
monkeypatch: pytest.MonkeyPatch, shared_name_handlers: tuple[CustomLLM | BaseVideoConfig, ...]
|
||||
) -> None:
|
||||
_register_handlers(
|
||||
monkeypatch,
|
||||
("other-handler", OptionalParamsEchoHandler()),
|
||||
("echo-handler", OpenAIVideoConfig()),
|
||||
("echo-handler", OptionalParamsEchoHandler()),
|
||||
*(("echo-handler", handler) for handler in shared_name_handlers),
|
||||
)
|
||||
|
||||
response: Final = litellm.completion(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue