Skip to content

Commit e55ca07

Browse files
authored
feat: pass 'client_options' to base class ctor (#104)
Closes #69.
1 parent e55b5a6 commit e55ca07

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

google/cloud/bigtable/client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@ def __init__(
174174
self._admin_client_options = admin_client_options
175175
self._channel = channel
176176
self.SCOPE = self._get_scopes()
177-
super(Client, self).__init__(project=project, credentials=credentials)
177+
super(Client, self).__init__(
178+
project=project, credentials=credentials, client_options=client_options,
179+
)
178180

179181
def _get_scopes(self):
180182
"""Get the scopes corresponding to admin / read-only state.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
release_status = 'Development Status :: 5 - Production/Stable'
3131
dependencies = [
3232
"google-api-core[grpc] >= 1.14.0, < 2.0.0dev",
33-
"google-cloud-core >= 1.0.3, < 2.0dev",
33+
"google-cloud-core >= 1.4.1, < 2.0dev",
3434
"grpc-google-iam-v1 >= 0.12.3, < 0.13dev",
3535
]
3636
extras = {

tests/unit/test_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,10 @@ def test_table_data_client_not_initialized_w_client_info(self):
231231
self.assertIs(client._table_data_client, table_data_client)
232232

233233
def test_table_data_client_not_initialized_w_client_options(self):
234+
from google.api_core.client_options import ClientOptions
235+
234236
credentials = _make_credentials()
235-
client_options = mock.Mock()
237+
client_options = ClientOptions(quota_project_id="QUOTA-PROJECT")
236238
client = self._make_one(
237239
project=self.PROJECT, credentials=credentials, client_options=client_options
238240
)

0 commit comments

Comments
 (0)