test(router): type the acreate_file fallback test helpers

This commit is contained in:
mateo-berri 2026-08-18 19:57:24 -07:00
parent 2a1c21b72d
commit b7f4f531b3
2 changed files with 3 additions and 2 deletions

View file

@ -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__")

View file

@ -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.",