mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix(router.py): add new test
This commit is contained in:
parent
dbc17a8c65
commit
c2f01b0fdc
1 changed files with 15 additions and 0 deletions
|
@ -436,3 +436,18 @@ def test_router_get_async_openai_model_client():
|
|||
deployment=MagicMock(), kwargs={}
|
||||
)
|
||||
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