diff --git a/tests/unit/test_gbq.py b/tests/unit/test_gbq.py index 3d293d60..ff8508c9 100644 --- a/tests/unit/test_gbq.py +++ b/tests/unit/test_gbq.py @@ -456,13 +456,16 @@ def test_read_gbq_with_no_project_id_given_should_fail(monkeypatch): def test_read_gbq_with_inferred_project_id_with_query( - monkeypatch, mock_bigquery_client + monkeypatch, mock_bigquery_client, mock_query_job ): monkeypatch.setattr( pandas_gbq.features.FEATURES, "_bigquery_installed_version", packaging.version.parse(pandas_gbq.features.BIGQUERY_MINIMUM_VERSION), ) + type(mock_query_job).cache_hit = mock.PropertyMock(return_value=False) + type(mock_query_job).total_bytes_billed = mock.PropertyMock(return_value=10_000_000) + type(mock_query_job).total_bytes_processed = mock.PropertyMock(return_value=12345) df = gbq.read_gbq("SELECT 1", dialect="standard") assert df is not None