From 26448beb675cdad8f5ef2a8d45f0bfe89b3372b3 Mon Sep 17 00:00:00 2001 From: chengzeyi Date: Sat, 22 Aug 2026 13:15:03 +0000 Subject: [PATCH] test(wavespeed): narrow the path-traversal assertion to its message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The merge brought in upstream's ruff-tests.toml, whose PT011 rule rejects a bare pytest.raises(ValueError). Matching on the message is the better assertion anyway — the bare form passed on any ValueError. --- .../test_litellm/llms/wavespeed/test_wavespeed_common_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_litellm/llms/wavespeed/test_wavespeed_common_utils.py b/tests/test_litellm/llms/wavespeed/test_wavespeed_common_utils.py index 83c22fc64e3..42067a551fd 100644 --- a/tests/test_litellm/llms/wavespeed/test_wavespeed_common_utils.py +++ b/tests/test_litellm/llms/wavespeed/test_wavespeed_common_utils.py @@ -46,7 +46,7 @@ class TestUrls: build_submit_url(None, "///") def test_path_traversal_in_the_model_id_is_rejected(self): - with pytest.raises(ValueError): + with pytest.raises(ValueError, match="model cannot be a dot path segment"): build_submit_url(None, "wavespeed-ai/../../admin") def test_prediction_id_is_percent_encoded(self):