mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
test(router): type the acreate_file fallback test helpers
This commit is contained in:
parent
2a1c21b72d
commit
b7f4f531b3
2 changed files with 3 additions and 2 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import json
|
||||
from typing import NoReturn
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
import httpx
|
||||
|
|
@ -167,7 +168,7 @@ async def _acreate_batch(*args, **kwargs):
|
|||
raise AssertionError("only used for its __name__")
|
||||
|
||||
|
||||
async def _acreate_file(*args, **kwargs):
|
||||
async def _acreate_file(*args: object, **kwargs: object) -> NoReturn:
|
||||
raise AssertionError("only used for its __name__")
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -518,7 +518,7 @@ async def test_async_router_acreate_file_does_not_fall_back_across_model_groups(
|
|||
fallbacks=[{"azure-gpt": ["openai-gpt"]}],
|
||||
)
|
||||
|
||||
def fail_azure(*args, **kwargs):
|
||||
def fail_azure(*args: object, **kwargs: object) -> MagicMock:
|
||||
if kwargs.get("model") == "azure/my-azure-deployment":
|
||||
raise litellm.APIConnectionError(
|
||||
message="Connection error.",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue