Conversation
|
|
||
| self._service_account_email = info['email'] | ||
| self._scopes = _helpers.string_to_scopes(info['scopes']) | ||
| self._scopes = info['scopes'] |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
system_tests/test_compute_engine.py
Outdated
| from google.auth import _helpers | ||
| from google.auth import compute_engine | ||
| from google.auth.compute_engine import _metadata | ||
| import pytest |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| if not _metadata.ping(request): | ||
| pytest.skip('Compute Engine metadata service is not available.') | ||
|
|
||
|
|
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| pytest.skip('Compute Engine metadata service is not available.') | ||
|
|
||
|
|
||
| def test_refresh(request, token_info): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| credentials.refresh(request) | ||
|
|
||
| assert credentials.token is not None | ||
| assert credentials._service_account_email is not None |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| assert credentials._service_account_email is not None | ||
|
|
||
| info = token_info(credentials.token) | ||
| info_scopes = _helpers.string_to_scopes(info['scope']) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| assert info['scope'] == ( | ||
| 'https://www.googleapis.com/auth/userinfo.email ' | ||
| 'https://www.googleapis.com/auth/userinfo.profile') | ||
| info_scopes = _helpers.string_to_scopes(info['scope']) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
LGTM (in light of the existence of #55). Also, don't block here, but as a general rule I try to have system tests only rely on public attributes. Why isn't it valuable for the svc. acct. email to be public? |
It could be useful, but I want to err on the side of being limited in our public interface. |
Resolves #40