[CI] Fix mock type narrowing in LoRA serving test (#59344)
Signed-off-by: khluu <khluu000@gmail.com> Co-authored-by: Codex <noreply@openai.com>
Kevin H. Luu committed
Sep 29, 2026 at 19:55 UTC
bec710fccf5f061c2946da3afa5b9e5c0b22c431
1 file changed
+2
-1
tests/entrypoints/serve/lora/test_serving_models.py
+2
-1
@@ -2,7 +2,7 @@
2
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3
4
from http import HTTPStatus
5
-from unittest.mock import MagicMock
5
+from unittest.mock import AsyncMock, MagicMock
6
7
import pytest
8
@@ -112,6 +112,7 @@ async def test_load_lora_adapter_base_model_name(load_inplace: bool):
112
assert response.error.type == "InvalidUserInput"
113
assert response.error.code == HTTPStatus.BAD_REQUEST
114
assert len(serving_models.lora_requests) == 0
115
+ assert isinstance(serving_models.engine_client.add_lora, AsyncMock)
116
serving_models.engine_client.add_lora.assert_not_called()
117
118