fix: track TLS usage with variable instead of isinstance check

Replace isinstance(ftp, ftplib.FTP_TLS) with a boolean flag to avoid issues when FTP_TLS is mocked in tests. Also fix Google Drive test parameter passing.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-13 16:20:32 +00:00
parent 307452fc8c
commit aa077f2b6c
2 changed files with 5 additions and 3 deletions
+2 -2
View File
@@ -328,7 +328,7 @@ class TestUploadToGoogleDriveTask:
mock_self = Mock()
mock_self.request.id = "test-task-id"
result = upload_to_google_drive(mock_self, "/tmp/test.pdf", include_metadata=True)
result = upload_to_google_drive(mock_self, "/tmp/test.pdf", True)
assert result["metadata_included"] is True
@@ -368,7 +368,7 @@ class TestUploadToGoogleDriveTask:
mock_self = Mock()
mock_self.request.id = "test-task-id"
result = upload_to_google_drive(mock_self, "/tmp/test.pdf", include_metadata=True)
result = upload_to_google_drive(mock_self, "/tmp/test.pdf", True)
# Verify the create call was made
mock_files.create.assert_called_once()