You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/01/18 07:28:22 UTC

[GitHub] zhongjiajie commented on a change in pull request #4535: [AIRFLOW-865] - Configure FTP connection mode

zhongjiajie commented on a change in pull request #4535: [AIRFLOW-865] - Configure FTP connection mode
URL: https://github.com/apache/airflow/pull/4535#discussion_r248946469
 
 

 ##########
 File path: tests/contrib/hooks/test_ftp_hook.py
 ##########
 @@ -125,5 +127,50 @@ def test_retrieve_file_with_callback(self):
         self.conn_mock.retrbinary.assert_called_once_with('RETR path', func)
 
 
+class TestIntegrationFTPHook(unittest.TestCase):
+
+    def setUp(self):
+        super(TestIntegrationFTPHook, self).setUp()
+        from airflow import configuration
+        from airflow.utils import db
+        from airflow import models
+
+        configuration.load_test_config()
+        db.merge_conn(
+            models.Connection(
 
 Review comment:
   The CI test show error like this
   ```
   41) ERROR: test_ftp_active_mode (tests.contrib.hooks.test_ftp_hook.TestIntegrationFTPHook)
   ----------------------------------------------------------------------
      Traceback (most recent call last):
       tests/contrib/hooks/test_ftp_hook.py line 140 in setUp
         models.Connection(
      AttributeError: module 'airflow.models' has no attribute 'Connection'
   ======================================================================
   ```
   I think I failed due to `models.Connection`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services