From bec710fccf5f061c2946da3afa5b9e5c0b22c431 Mon Sep 17 00:00:00 2001 From: "Kevin H. Luu" Date: Tue, 29 Sep 2026 19:55:04 -0700 Subject: [PATCH] [CI] Fix mock type narrowing in LoRA serving test (#59344) Signed-off-by: khluu Co-authored-by: Codex --- tests/entrypoints/serve/lora/test_serving_models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/entrypoints/serve/lora/test_serving_models.py b/tests/entrypoints/serve/lora/test_serving_models.py index 64be0961cb..b2aefff219 100644 --- a/tests/entrypoints/serve/lora/test_serving_models.py +++ b/tests/entrypoints/serve/lora/test_serving_models.py @@ -2,7 +2,7 @@ # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from http import HTTPStatus -from unittest.mock import MagicMock +from unittest.mock import AsyncMock, MagicMock import pytest @@ -112,6 +112,7 @@ async def test_load_lora_adapter_base_model_name(load_inplace: bool): assert response.error.type == "InvalidUserInput" assert response.error.code == HTTPStatus.BAD_REQUEST assert len(serving_models.lora_requests) == 0 + assert isinstance(serving_models.engine_client.add_lora, AsyncMock) serving_models.engine_client.add_lora.assert_not_called()