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/06 09:24:32 UTC

[GitHub] feluelle commented on a change in pull request #4447: [AIRFLOW-3637] Fix test for HiveToMySqlTransfer Operator

feluelle commented on a change in pull request #4447: [AIRFLOW-3637] Fix test for HiveToMySqlTransfer Operator
URL: https://github.com/apache/airflow/pull/4447#discussion_r245501705
 
 

 ##########
 File path: tests/operators/test_hive_to_mysql.py
 ##########
 @@ -43,7 +43,7 @@ def test_execute(self, mock_hive_hook, mock_mysql_hook):
         HiveToMySqlTransfer(**self.kwargs).execute(context={})
 
         mock_hive_hook.assert_called_once_with(hiveserver2_conn_id=self.kwargs['hiveserver2_conn_id'])
-        mock_hive_hook.return_value.get_records.assert_called_once_with(self.kwargs['sql'])
+        mock_hive_hook.return_value.get_records.assert_called_once_with('sql', hive_conf={})
 
 Review comment:
   Why did you change the first param to a static value instead of the reference that is being passed to the `HiveToMySqlTransfer` constructor? 
   I mean why not `self.kwargs['sql'], hive_conf={}`. This way it would even work if you change the kwargs input dict.

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