Skip to content

Commit

Permalink
feat: pass 'client_options' to base class ctor (#104)
Browse files Browse the repository at this point in the history
Closes #69.
  • Loading branch information
tseaver committed Aug 12, 2020
1 parent e55b5a6 commit e55ca07
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion google/cloud/bigtable/client.py
Expand Up @@ -174,7 +174,9 @@ def __init__(
self._admin_client_options = admin_client_options
self._channel = channel
self.SCOPE = self._get_scopes()
super(Client, self).__init__(project=project, credentials=credentials)
super(Client, self).__init__(
project=project, credentials=credentials, client_options=client_options,
)

def _get_scopes(self):
"""Get the scopes corresponding to admin / read-only state.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -30,7 +30,7 @@
release_status = 'Development Status :: 5 - Production/Stable'
dependencies = [
"google-api-core[grpc] >= 1.14.0, < 2.0.0dev",
"google-cloud-core >= 1.0.3, < 2.0dev",
"google-cloud-core >= 1.4.1, < 2.0dev",
"grpc-google-iam-v1 >= 0.12.3, < 0.13dev",
]
extras = {
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/test_client.py
Expand Up @@ -231,8 +231,10 @@ def test_table_data_client_not_initialized_w_client_info(self):
self.assertIs(client._table_data_client, table_data_client)

def test_table_data_client_not_initialized_w_client_options(self):
from google.api_core.client_options import ClientOptions

credentials = _make_credentials()
client_options = mock.Mock()
client_options = ClientOptions(quota_project_id="QUOTA-PROJECT")
client = self._make_one(
project=self.PROJECT, credentials=credentials, client_options=client_options
)
Expand Down

0 comments on commit e55ca07

Please sign in to comment.