From cbd712e6d3aded0c025525f97da1d667fbe2f061 Mon Sep 17 00:00:00 2001 From: Chris Rossi Date: Fri, 5 Mar 2021 14:05:00 -0500 Subject: [PATCH] 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. --- tests/unit/test_client.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/unit/test_client.py b/tests/unit/test_client.py index 60a2cd738..5f2d7db26 100644 --- a/tests/unit/test_client.py +++ b/tests/unit/test_client.py @@ -103,6 +103,7 @@ def _get_target_class(): def _make_one(self, *args, **kwargs): return self._get_target_class()(*args, **kwargs) + @mock.patch("os.environ", {}) def test_constructor_defaults(self): from google.cloud.bigtable.client import _CLIENT_INFO from google.cloud.bigtable.client import DATA_SCOPE