This repository was archived by the owner on Mar 2, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
This repository was archived by the owner on Mar 2, 2026. It is now read-only.
'TestClient.test_constructor_w_implicit_inputs' unit test failure #53
Copy link
Copy link
Closed
Labels
api: datastoreIssues related to the googleapis/python-datastore API.Issues related to the googleapis/python-datastore API.priority: p0Highest priority. Critical issue. P0 implies highest priority.Highest priority. Critical issue. P0 implies highest priority.testingtype: processA process-related concern. May include testing, release, or the like.A process-related concern. May include testing, release, or the like.
Description
From this Kokoro build failure:
________________ TestClient.test_constructor_w_implicit_inputs _________________
self = <tests.unit.test_client.TestClient testMethod=test_constructor_w_implicit_inputs>
def test_constructor_w_implicit_inputs(self):
from google.cloud.datastore.client import _CLIENT_INFO
from google.cloud.datastore.client import _DATASTORE_BASE_URL
other = "other"
creds = _make_credentials()
klass = self._get_target_class()
patch1 = mock.patch(
"google.cloud.datastore.client._determine_default_project",
return_value=other,
)
patch2 = mock.patch("google.auth.default", return_value=(creds, None))
with patch1 as _determine_default_project:
with patch2 as default:
client = klass()
self.assertEqual(client.project, other)
self.assertIsNone(client.namespace)
self.assertIs(client._credentials, creds)
self.assertIs(client._client_info, _CLIENT_INFO)
self.assertIsNone(client._http_internal)
self.assertIsNone(client._client_options)
self.assertEqual(client.base_url, _DATASTORE_BASE_URL)
self.assertIsNone(client.current_batch)
self.assertIsNone(client.current_transaction)
> default.assert_called_once_with()
tests/unit/test_client.py:183:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.nox/unit-2-7/lib/python2.7/site-packages/mock/mock.py:957: in assert_called_once_with
return self.assert_called_with(*args, **kwargs)
.nox/unit-2-7/lib/python2.7/site-packages/mock/mock.py:944: in assert_called_with
six.raise_from(AssertionError(_error_message(cause)), cause)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
value = AssertionError("expected call not found.\nExpected: default()\nActual: default(scopes=('https://www.googleapis.com/auth/datastore',))",)
from_value = None
def raise_from(value, from_value):
> raise value
E AssertionError: expected call not found.
E Expected: default()
E Actual: default(scopes=('https://www.googleapis.com/auth/datastore',))Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: datastoreIssues related to the googleapis/python-datastore API.Issues related to the googleapis/python-datastore API.priority: p0Highest priority. Critical issue. P0 implies highest priority.Highest priority. Critical issue. P0 implies highest priority.testingtype: processA process-related concern. May include testing, release, or the like.A process-related concern. May include testing, release, or the like.