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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user