@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryHook.get_service')
def test_next_buffer(self, mock_get_service):
    bq_cursor = self.hook.get_cursor()
    bq_cursor.job_id = JOB_ID
    bq_cursor.buffer = [1, 2]
    result = bq_cursor.next()
    assert (1 == result)
    result = bq_cursor.next()
    assert (2 == result)
    bq_cursor.all_pages_loaded = True
    result = bq_cursor.next()
    assert (result is None)
@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryHook.get_service')
def test_next_buffer(self, mock_get_service):
    bq_cursor = self.hook.get_cursor()
    bq_cursor.job_id = JOB_ID
    bq_cursor.buffer = [1, 2]
    result = bq_cursor.next()
    assert (1 == result)
    result = bq_cursor.next()
    assert (2 == result)
    bq_cursor.all_pages_loaded = True
    result = bq_cursor.next()
    assert (result is None)