mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 19:54:13 +00:00
fix(router.py): add new test
This commit is contained in:
parent
e6f741e88c
commit
d96825d7cd
1 changed files with 15 additions and 0 deletions
|
@ -436,3 +436,18 @@ def test_router_get_async_openai_model_client():
|
||||||
deployment=MagicMock(), kwargs={}
|
deployment=MagicMock(), kwargs={}
|
||||||
)
|
)
|
||||||
assert model_client is None
|
assert model_client is None
|
||||||
|
|
||||||
|
|
||||||
|
def test_router_get_deployment_credentials():
|
||||||
|
router = Router(
|
||||||
|
model_list=[
|
||||||
|
{
|
||||||
|
"model_name": "gemini/*",
|
||||||
|
"litellm_params": {"model": "gemini/*", "api_key": "123"},
|
||||||
|
"model_info": {"id": "1"},
|
||||||
|
}
|
||||||
|
]
|
||||||
|
)
|
||||||
|
credentials = router.get_deployment_credentials(model_id="1")
|
||||||
|
assert credentials is not None
|
||||||
|
assert credentials["api_key"] == "123"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue