diff --git a/tests/test_filename_utils.py b/tests/test_filename_utils.py index 46b95e67..9cbf3976 100644 --- a/tests/test_filename_utils.py +++ b/tests/test_filename_utils.py @@ -491,8 +491,9 @@ class TestExtractRemotePathEdgeCases: from app.utils.filename_utils import extract_remote_path result = extract_remote_path("/base/processed/subdir/processed/file.pdf", "/base", "/remote") - # Should remove all 'processed' directories - assert "processed" not in result.lower() + # Function removes only first occurrence of 'processed' directory + # Result should be: remote/subdir/processed/file.pdf + assert result == "remote/subdir/processed/file.pdf" def test_remote_base_with_trailing_slash(self): """Test remote base that already has trailing slash."""