diff --git a/google/cloud/firestore_v1/base_client.py b/google/cloud/firestore_v1/base_client.py index b3691cffc..06ec6b8e2 100644 --- a/google/cloud/firestore_v1/base_client.py +++ b/google/cloud/firestore_v1/base_client.py @@ -109,7 +109,10 @@ def __init__( # will have no impact since the _http() @property only lazily # creates a working HTTP object. super(BaseClient, self).__init__( - project=project, credentials=credentials, _http=None + project=project, + credentials=credentials, + client_options=client_options, + _http=None, ) self._client_info = client_info if client_options: diff --git a/setup.py b/setup.py index a565fb27a..a9bfd86af 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ "google-api-core[grpc] >= 1.21.0, < 2.0.0dev", - "google-cloud-core >= 1.0.3, < 2.0dev", + "google-cloud-core >= 1.4.1, < 2.0dev", "pytz", "libcst >= 0.2.5", "proto-plus >= 1.3.0", diff --git a/tests/unit/v1/test_async_client.py b/tests/unit/v1/test_async_client.py index 8a6527175..770d6ae20 100644 --- a/tests/unit/v1/test_async_client.py +++ b/tests/unit/v1/test_async_client.py @@ -63,10 +63,12 @@ def test_constructor_with_emulator_host(self): getenv.assert_called_once_with(_FIRESTORE_EMULATOR_HOST) def test_constructor_explicit(self): + from google.api_core.client_options import ClientOptions + credentials = _make_credentials() database = "now-db" client_info = mock.Mock() - client_options = mock.Mock() + client_options = ClientOptions("endpoint") client = self._make_one( project=self.PROJECT, credentials=credentials, diff --git a/tests/unit/v1/test_client.py b/tests/unit/v1/test_client.py index 433fcadfa..b943fd1e1 100644 --- a/tests/unit/v1/test_client.py +++ b/tests/unit/v1/test_client.py @@ -61,10 +61,12 @@ def test_constructor_with_emulator_host(self): getenv.assert_called_once_with(_FIRESTORE_EMULATOR_HOST) def test_constructor_explicit(self): + from google.api_core.client_options import ClientOptions + credentials = _make_credentials() database = "now-db" client_info = mock.Mock() - client_options = mock.Mock() + client_options = ClientOptions("endpoint") client = self._make_one( project=self.PROJECT, credentials=credentials,