Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Rip&Tear
2026-06-20 11:11:24 +08:00
committed by GitHub
parent 685ea13c3b
commit 4877828264

View File

@@ -50,7 +50,7 @@ class TestValidateFilePath:
"""Reject symlinks that point outside base_dir."""
link = tmp_path / "sneaky_link"
os.symlink("/etc/passwd", str(link))
with pytest.raises(ValueError, match="outside the allowed director"):
with pytest.raises(ValueError, match="outside the allowed directories"):
validate_file_path("sneaky_link", str(tmp_path))
def test_defaults_to_cwd(self):