RachitSharma2001 commented on code in PR #28318:
URL: https://github.com/apache/airflow/pull/28318#discussion_r1051680027


##########
tests/providers/ftp/operators/test_ftp.py:
##########
@@ -184,3 +180,108 @@ def test_unequal_local_remote_file_paths(self):
                 local_filepath=["/tmp/test1", "/tmp/test2"],
                 remote_filepath="/tmp/test1",
             )
+
+
+class TestFTPSFileTransmitOperator:
+    def setup_method(self):
+        self.test_local_dir = "/tmp"
+        self.test_local_dir_int = "/tmp/interdir"
+        self.test_remote_dir = "/ftpshome"
+        self.test_remote_dir_int = "/ftpshome/interdir"
+        self.test_local_filename = "test_local_file"
+        self.test_remote_filename = "test_remote_file"
+        self.test_local_filepath = 
f"{self.test_local_dir}/{self.test_local_filename}"
+        self.test_remote_filepath = 
f"{self.test_remote_dir}/{self.test_remote_filename}"
+        self.test_local_filepath_int_dir = 
f"{self.test_local_dir_int}/{self.test_local_filename}"
+        self.test_remote_filepath_int_dir = 
f"{self.test_remote_dir_int}/{self.test_remote_filename}"
+
+    def teardown_method(self):
+        if os.path.exists(self.test_local_dir_int):
+            os.rmdir(self.test_local_dir_int)

Review Comment:
   @Taragolis Thank you for letting me know, that is a good point. I have 
pushed a change where any directories that are created are created within 
`tmp_path`. You can see the change in 
`test_file_transfer_with_intermediate_dir_get`. Let me know if there is 
anything else needed to be added.



##########
tests/providers/ftp/operators/test_ftp.py:
##########
@@ -184,3 +180,108 @@ def test_unequal_local_remote_file_paths(self):
                 local_filepath=["/tmp/test1", "/tmp/test2"],
                 remote_filepath="/tmp/test1",
             )
+
+
+class TestFTPSFileTransmitOperator:
+    def setup_method(self):
+        self.test_local_dir = "/tmp"
+        self.test_local_dir_int = "/tmp/interdir"
+        self.test_remote_dir = "/ftpshome"
+        self.test_remote_dir_int = "/ftpshome/interdir"
+        self.test_local_filename = "test_local_file"
+        self.test_remote_filename = "test_remote_file"
+        self.test_local_filepath = 
f"{self.test_local_dir}/{self.test_local_filename}"
+        self.test_remote_filepath = 
f"{self.test_remote_dir}/{self.test_remote_filename}"
+        self.test_local_filepath_int_dir = 
f"{self.test_local_dir_int}/{self.test_local_filename}"
+        self.test_remote_filepath_int_dir = 
f"{self.test_remote_dir_int}/{self.test_remote_filename}"
+
+    def teardown_method(self):
+        if os.path.exists(self.test_local_dir_int):
+            os.rmdir(self.test_local_dir_int)

Review Comment:
   @Taragolis Thank you for letting me know, that is a good point. I have 
pushed a change where any directories that are created are done so within 
`tmp_path`. You can see the change in 
`test_file_transfer_with_intermediate_dir_get`. Let me know if there is 
anything else needed to be added.



-- 
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