fix: add os.path.splitext mocks and fix test assertions

Add os.path.splitext patches to Google Drive tests, fix FTP directory creation test, and correct webViewLink assertion

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-13 16:24:25 +00:00
parent aa077f2b6c
commit ddad5f222b
2 changed files with 30 additions and 8 deletions
+8 -1
View File
@@ -168,7 +168,14 @@ class TestUploadToFtp:
mock_settings.ftp_use_tls = True
mock_ftp = Mock()
mock_ftp.cwd.side_effect = [ftplib.error_perm("No such directory"), None] # noqa: S321
# First cwd fails (trying full path), then for each subfolder: fail then succeed after mkd
mock_ftp.cwd.side_effect = [
ftplib.error_perm("No such directory"), # noqa: S321 # Initial try for full path
ftplib.error_perm("No such directory"), # noqa: S321 # /uploads doesn't exist
None, # /uploads now exists after mkd
ftplib.error_perm("No such directory"), # noqa: S321 # /uploads/documents doesn't exist
None, # /uploads/documents now exists after mkd
]
mock_ftp_tls.return_value = mock_ftp
mock_self = Mock()