This is an automated email from the ASF dual-hosted git repository.
jrmccluskey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 313c54decad update bigquery tools test patch (#40746)
313c54decad is described below
commit 313c54decad45ab5175258d7aa9e7772c5897fff
Author: Derrick Williams <[email protected]>
AuthorDate: Fri Oct 23 12:28:54 2026 -0400
update bigquery tools test patch (#40746)
---
sdks/python/apache_beam/io/gcp/bigquery_tools_test.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/sdks/python/apache_beam/io/gcp/bigquery_tools_test.py
b/sdks/python/apache_beam/io/gcp/bigquery_tools_test.py
index be5441c263b..b65faac45b1 100644
--- a/sdks/python/apache_beam/io/gcp/bigquery_tools_test.py
+++ b/sdks/python/apache_beam/io/gcp/bigquery_tools_test.py
@@ -335,9 +335,10 @@ class TestBigQueryEndpoint(unittest.TestCase):
self.assertEqual(client.url, 'https://bq.example.com/bigquery/v2/')
@mock.patch.object(bigquery_tools.auth, 'get_service_credentials')
- @mock.patch.object(bigquery_tools.gcp_bigquery, 'Client')
+ @mock.patch('apache_beam.io.gcp.bigquery_tools.gcp_bigquery')
def test_wrapper_applies_endpoint_to_both_clients(
- self, mock_gcp_client, unused_mock_credentials):
+ self, mock_gcp_bq, unused_mock_credentials):
+ mock_gcp_client = mock_gcp_bq.Client
options = PipelineOptions(['--bigquery_endpoint=https://bq.example.com'])
wrapper = bigquery_tools.BigQueryWrapper(pipeline_options=options)
self.assertEqual(wrapper.client.url, 'https://bq.example.com/bigquery/v2/')
@@ -347,8 +348,9 @@ class TestBigQueryEndpoint(unittest.TestCase):
mock_gcp_client.call_args.kwargs['client_options'],
{'api_endpoint': 'https://bq.example.com'})
- @mock.patch.object(bigquery_tools.gcp_bigquery, 'Client')
- def test_gcp_client_merges_endpoint_and_quota_project(self, mock_gcp_client):
+ @mock.patch('apache_beam.io.gcp.bigquery_tools.gcp_bigquery')
+ def test_gcp_client_merges_endpoint_and_quota_project(self, mock_gcp_bq):
+ mock_gcp_client = mock_gcp_bq.Client
options = PipelineOptions(['--bigquery_endpoint=https://bq.example.com'])
bigquery_tools.BigQueryWrapper._gcp_bigquery_client(
quota_project_id='billing', pipeline_options=options)