Skip to content

Commit cbd712e

Browse files
author
Chris Rossi
authored
fix: fix unit test that could be broken by user's environment (#239)
Unit test for the `google.cloud.bigtable.Client` constructor was picking up the project from user's `GOOGLE_CLOUD_PROJECT` environment variable.
1 parent 6df4df8 commit cbd712e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/unit/test_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ def _get_target_class():
103103
def _make_one(self, *args, **kwargs):
104104
return self._get_target_class()(*args, **kwargs)
105105

106+
@mock.patch("os.environ", {})
106107
def test_constructor_defaults(self):
107108
from google.cloud.bigtable.client import _CLIENT_INFO
108109
from google.cloud.bigtable.client import DATA_SCOPE

0 commit comments

Comments
 (0)