Content-Length: 297353 | pFad | http://github.com/googleapis/google-cloud-python/commit/7e29a3da6a13e2d442d2e205e342fd03697a4f1b

19 Using client's credentials in error reporting (instead of connection). · googleapis/google-cloud-python@7e29a3d · GitHub
Skip to content

Commit 7e29a3d

Browse files
committed
Using client's credentials in error reporting (instead of connection).
1 parent a151715 commit 7e29a3d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

error_reporting/google/cloud/error_reporting/_gax.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def make_report_error_api(client):
3636
:returns: An Error Reporting API instance.
3737
"""
3838
channel = make_secure_channel(
39-
client._connection.credentials,
39+
client._credentials,
4040
DEFAULT_USER_AGENT,
4141
report_errors_service_client.ReportErrorsServiceClient.SERVICE_ADDRESS)
4242
gax_client = report_errors_service_client.ReportErrorsServiceClient(

error_reporting/unit_tests/test__gax.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ def test_make_report_error_api(self):
2828
from google.cloud.error_reporting import __version__
2929
from google.cloud.error_reporting._gax import make_report_error_api
3030

31-
client = mock.Mock()
31+
client = mock.Mock(
32+
_credentials=mock.sentinel.credentials,
33+
project='prahj-ekt',
34+
spec=['project', '_credentials'],
35+
)
3236

3337
# Mock out the constructor for the GAPIC client.
3438
ServiceClient = report_errors_service_client.ReportErrorsServiceClient

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/googleapis/google-cloud-python/commit/7e29a3da6a13e2d442d2e205e342fd03697a4f1b

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy