test(wavespeed): narrow the path-traversal assertion to its message

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.
This commit is contained in:
chengzeyi 2026-08-22 13:15:03 +00:00
parent 43adca6e34
commit 26448beb67

View file

@ -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):