@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryHook.get_service')
def test_next(self, mock_get_service):
    mock_get_query_results = mock_get_service.return_value.jobs.return_value.getQueryResults
    mock_execute = mock_get_query_results.return_value.execute
    mock_execute.return_value = {'rows': [{'f': [{'v': 'one'}, {'v': 1}]}, {'f': [{'v': 'two'}, {'v': 2}]}], 'pageToken': None, 'schema': {'fields': [{'name': 'field_1', 'type': 'STRING'}, {'name': 'field_2', 'type': 'INTEGER'}]}}
    bq_cursor = self.hook.get_cursor()
    bq_cursor.job_id = JOB_ID
    bq_cursor.location = LOCATION
    result = bq_cursor.next()
    assert (['one', 1] == result)
    result = bq_cursor.next()
    assert (['two', 2] == result)
    mock_get_query_results.assert_called_once_with(jobId=JOB_ID, location=LOCATION, pageToken=None, projectId='bq-project')
    mock_execute.assert_called_once_with(num_retries=bq_cursor.num_retries)
@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryHook.get_service')
def test_next(self, mock_get_service):
    mock_get_query_results = mock_get_service.return_value.jobs.return_value.getQueryResults
    mock_execute = mock_get_query_results.return_value.execute
    mock_execute.return_value = {'rows': [{'f': [{'v': 'one'}, {'v': 1}]}, {'f': [{'v': 'two'}, {'v': 2}]}], 'pageToken': None, 'schema': {'fields': [{'name': 'field_1', 'type': 'STRING'}, {'name': 'field_2', 'type': 'INTEGER'}]}}
    bq_cursor = self.hook.get_cursor()
    bq_cursor.job_id = JOB_ID
    bq_cursor.location = LOCATION
    result = bq_cursor.next()
    assert (['one', 1] == result)
    result = bq_cursor.next()
    assert (['two', 2] == result)
    mock_get_query_results.assert_called_once_with(jobId=JOB_ID, location=LOCATION, pageToken=None, projectId='bq-project')
    mock_execute.assert_called_once_with(num_retries=bq_cursor.num_retries)