phanikumv commented on code in PR #66850:
URL: https://github.com/apache/airflow/pull/66850#discussion_r3252688464


##########
providers/imap/tests/unit/imap/hooks/test_imap.py:
##########
@@ -509,3 +509,117 @@ def test_has_mail_attachment_with_max_mails(self, 
mock_imaplib):
 
         assert result is True
         assert 1 <= mock_conn.fetch.call_count <= 2
+
+    @patch(open_string, new_callable=mock_open)
+    @patch(imaplib_string)
+    def test_download_attachments_overwrite_default(self, mock_imaplib, 
mock_open_method):

Review Comment:
   The `FileExistsError` retry is exactly the path these 6 tests don't cover. 
Recommend one test where `mock_open` raises `FileExistsError` on the first call 
and succeeds on the next.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to