Closed DanieleQuasimodo closed 1 year ago
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
@DanieleQuasimodo thank you for your PR. Could you add some unit tests to cover your change (for example, https://github.com/googleapis/google-auth-library-python/blob/main/tests/test__helpers.py and https://github.com/googleapis/google-auth-library-python/blob/main/tests/compute_engine/test__metadata.py).
@DanieleQuasimodo thank you for your PR. Could you add some unit tests to cover your change (for example, https://github.com/googleapis/google-auth-library-python/blob/main/tests/test__helpers.py and https://github.com/googleapis/google-auth-library-python/blob/main/tests/compute_engine/test__metadata.py).
Sure, no problem! Yesterday I was a bit rushed and completely forgot about it. I'll get some tests written as soon as I find a moment.
These should do. The _metadata test is probably a bit redundant (_metadata inner workings haven't really changed except for invoking the new function, which is already tested in the _helpers tests), but I still added it, just in case.
The forced push to my fork was just because I'm dumb, committed with the wrong account and had to ammend the author (so Google CLA is happy) 😅
@DanieleQuasimodo The PR looks great, thanks! Could you run python -m nox -s lint
to format the files (this caused kokoro build failure)? After that I will go ahead to merge the PR.
@arithmetic1728 I think now it should be ok. I ran both blacken and lint
Less restrictive content-type header check for google authentication (now only the media-type is compared, ignoring charset, boundary, etc). Should fix issue #1089.
Implemented as suggested in PEP-594 (due to deprecation of cgi.parse_header. See https://peps.python.org/pep-0594/#cgi).