Skip to content

Comments

Add more auth samples#981

Merged
theacodes merged 1 commit intomasterfrom
auth-moar-samples
Jun 12, 2017
Merged

Add more auth samples#981
theacodes merged 1 commit intomasterfrom
auth-moar-samples

Conversation

@theacodes
Copy link
Contributor

Add samples for explicitly using compute and app engine credentials.

Add samples for explicitly using compute and app engine credentials.
@theacodes theacodes requested a review from andrewsg June 12, 2017 19:42
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 12, 2017

def test_explicit_compute_engine():
adc, project = google.auth.default()
credentials_patch = mock.patch(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why assign this to a variable and then use it as a context manager instead of inlining it with the "with" as in the test above?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because splitting context manager syntax over multiple lines is extremely awkward, so we've gotten into the habit of giving the patch manager its own variable.

@theacodes theacodes merged commit 88700c3 into master Jun 12, 2017
@theacodes theacodes deleted the auth-moar-samples branch June 12, 2017 20:28
chalmerlowe pushed a commit that referenced this pull request Feb 19, 2026
PR created by the Librarian CLI to initialize a release. Merging this PR
will auto trigger a release.

Librarian Version: v0.7.0
Language Image:
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:8e2c32496077054105bd06c54a59d6a6694287bc053588e24debe6da6920ad91
<details><summary>google-cloud-logging: 3.13.0</summary>

##
[3.13.0](googleapis/python-logging@v3.12.1...v3.13.0)
(2025-12-15)

### Features

* Add support for python 3.14 (#1065)
([6be3df6a](googleapis/python-logging@6be3df6a))

### Bug Fixes

* remove setup.cfg configuration for creating universal wheels (#981)
([70f612c3](googleapis/python-logging@70f612c3))

</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants