@@ -247,7 +247,7 @@ def test_read_gbq_cached_table():
247247 table ,
248248 )
249249
250- session .bqclient .query_and_wait = mock .MagicMock (
250+ session .bqclient ._query_and_wait_bigframes = mock .MagicMock (
251251 return_value = ({"total_count" : 3 , "distinct_count" : 2 },)
252252 )
253253 session .bqclient .get_table .return_value = table
@@ -278,7 +278,7 @@ def test_read_gbq_cached_table_doesnt_warn_for_anonymous_tables_and_doesnt_inclu
278278 table ,
279279 )
280280
281- session .bqclient .query_and_wait = mock .MagicMock (
281+ session .bqclient ._query_and_wait_bigframes = mock .MagicMock (
282282 return_value = ({"total_count" : 3 , "distinct_count" : 2 },)
283283 )
284284 session .bqclient .get_table .return_value = table
@@ -306,7 +306,9 @@ def test_default_index_warning_raised_by_read_gbq(table):
306306 bqclient = mock .create_autospec (google .cloud .bigquery .Client , instance = True )
307307 bqclient .project = "test-project"
308308 bqclient .get_table .return_value = table
309- bqclient .query_and_wait .return_value = ({"total_count" : 3 , "distinct_count" : 2 },)
309+ bqclient ._query_and_wait_bigframes .return_value = (
310+ {"total_count" : 3 , "distinct_count" : 2 },
311+ )
310312 session = mocks .create_bigquery_session (
311313 bqclient = bqclient ,
312314 # DefaultIndexWarning is only relevant for strict mode.
@@ -333,7 +335,9 @@ def test_default_index_warning_not_raised_by_read_gbq_index_col_sequential_int64
333335 bqclient = mock .create_autospec (google .cloud .bigquery .Client , instance = True )
334336 bqclient .project = "test-project"
335337 bqclient .get_table .return_value = table
336- bqclient .query_and_wait .return_value = ({"total_count" : 4 , "distinct_count" : 3 },)
338+ bqclient ._query_and_wait_bigframes .return_value = (
339+ {"total_count" : 4 , "distinct_count" : 3 },
340+ )
337341 session = mocks .create_bigquery_session (
338342 bqclient = bqclient ,
339343 # DefaultIndexWarning is only relevant for strict mode.
@@ -382,7 +386,7 @@ def test_default_index_warning_not_raised_by_read_gbq_index_col_columns(
382386 bqclient = mock .create_autospec (google .cloud .bigquery .Client , instance = True )
383387 bqclient .project = "test-project"
384388 bqclient .get_table .return_value = table
385- bqclient .query_and_wait .return_value = (
389+ bqclient ._query_and_wait_bigframes .return_value = (
386390 {"total_count" : total_count , "distinct_count" : distinct_count },
387391 )
388392 session = mocks .create_bigquery_session (
@@ -492,6 +496,7 @@ def query_mock(query, *args, **kwargs):
492496 return session_query_mock (query , * args , ** kwargs )
493497
494498 session .bqclient .query_and_wait = query_mock
499+ session .bqclient ._query_and_wait_bigframes = query_mock
495500
496501 def get_table_mock (table_ref ):
497502 table = google .cloud .bigquery .Table (
0 commit comments