@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryHook.get_service')
@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryCursor.fetchone', side_effect=[1, 2, 3, None])
def test_fetchall(self, mock_fetchone, mock_get_service):
    bq_cursor = self.hook.get_cursor()
    result = bq_cursor.fetchall()
    assert ([1, 2, 3] == result)
@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryHook.get_service')
@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryCursor.fetchone', side_effect=[1, 2, 3, None])
def test_fetchall(self, mock_fetchone, mock_get_service):
    bq_cursor = self.hook.get_cursor()
    result = bq_cursor.fetchall()
    assert ([1, 2, 3] == result)