Skip to content

Conversation

@sararob
Copy link
Contributor

@sararob sararob commented May 19, 2022

I added a mock for google.auth.credentials so that the tests can fall back to that when running in an environment that doesn't have the GOOGLE_APPLICATION_CREDENTIALS env var set. This includes:

  • The auth mock in a new module-scoped fixture in tests/unit/aiplatform/conftest.py
  • Adding this mock to any test classes that require it

Fixes b/198162654 🦕

@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: vertex-ai Issues related to the googleapis/python-aiplatform API. labels May 19, 2022
@sararob sararob requested a review from sasha-gitg May 20, 2022 13:01
from test_models import upload_model_mock, get_model_mock # noqa: F401


@pytest.mark.usefixtures("google_auth_mock")
Copy link
Member

Choose a reason for hiding this comment

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

Don't think this is needed here.

@sararob sararob merged commit 15bc80b into googleapis:main May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: vertex-ai Issues related to the googleapis/python-aiplatform API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants