A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 11, 08:45 UTC
Fix instantiation of `HfHubHTTPError` in LoRA test (#30768)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Harry Mellor committed
Dec 16, 2025 at 16:02 UTC
af506fd76ada27be322d8b89c090dd97a467f7ad
1 file changed
+5
-2
tests/lora/test_utils.py
+5
-2
@@ -3,7 +3,7 @@
3
4
from collections import OrderedDict
5
from typing import NamedTuple
6
-from unittest.mock import patch
6
+from unittest.mock import MagicMock, patch
7
8
import pytest
9
from huggingface_hub.utils import HfHubHTTPError
@@ -194,5 +194,8 @@ def test_get_adapter_absolute_path_huggingface_error(
194
# Hugging Face model identifier with download error
195
path = "org/repo"
196
mock_exist.return_value = False
197
- mock_snapshot_download.side_effect = HfHubHTTPError("failed to query model info")
197
+ mock_snapshot_download.side_effect = HfHubHTTPError(
198
+ "failed to query model info",
199
+ response=MagicMock(),
200
+ )
201
assert get_adapter_absolute_path(path) == path