uranusjr commented on a change in pull request #17777:
URL: https://github.com/apache/airflow/pull/17777#discussion_r694503504



##########
File path: tests/providers/apache/hive/hooks/test_hive.py
##########
@@ -687,6 +687,13 @@ def test_get_pandas_df(self):
         hook.mock_cursor.execute.assert_any_call('set 
airflow.ctx.dag_owner=airflow')
         hook.mock_cursor.execute.assert_any_call('set 
airflow.ctx.dag_email=t...@airflow.com')
 
+        hook = MockHiveServer2Hook(empty_table_flag = True)

Review comment:
       I’d probably do something like 
`MockHiveServer2Hook(connection_cursor=EmptyMockTableCursor())` instead. 
`EmptyMockTableCursor` would inherit from a new `BaseMockHiveServer2Hook` class 
that contains common logic refactored out of `MockHiveServer2Hook` (which would 
then also inherit from `BaseMockHiveServer2Hook`).




-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to