test(cli): type cost map bypass regression handlers

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
kerry 2026-09-09 06:30:50 +00:00
parent 25a6c2a274
commit ffae447649
2 changed files with 6 additions and 4 deletions

View file

@ -722,7 +722,9 @@ def test_boot_load_that_fails_the_integrity_check_reports_the_backup_not_the_rej
("/some/venv/bin/python", 1),
],
)
def test_boot_load_skips_remote_fetch_for_cli_processes(monkeypatch, argv0, request_count):
def test_boot_load_skips_remote_fetch_for_cli_processes(
monkeypatch: pytest.MonkeyPatch, argv0: str, request_count: int
) -> None:
monkeypatch.setattr(sys, "argv", [argv0, "--version"])
monkeypatch.delenv("LITELLM_LOCAL_MODEL_COST_MAP", raising=False)
client, calls = _mock_client([httpx.Response(200, content=_real_map_bytes())], client_cls=httpx.Client)

View file

@ -42,10 +42,10 @@ def test_lite_version_does_not_fetch_model_cost_map():
if lite_path is None:
pytest.skip("lite executable is unavailable")
requests = []
requests: list[str] = []
class _CostMapHandler(BaseHTTPRequestHandler):
def do_GET(self):
def do_GET(self) -> None:
requests.append(self.path)
body = b'{"test-model": {"litellm_provider": "openai", "mode": "chat"}}'
self.send_response(200)
@ -54,7 +54,7 @@ def test_lite_version_does_not_fetch_model_cost_map():
self.end_headers()
self.wfile.write(body)
def log_message(self, format, *args):
def log_message(self, format: str, *args: object) -> None:
return
server = ThreadingHTTPServer(("127.0.0.1", 0), _CostMapHandler)