Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: pass 'client_options' to base class ctor #104

Merged
merged 3 commits into from Aug 12, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.0, < 2.0dev",
tseaver marked this conversation as resolved.
Show resolved Hide resolved
"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