FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

chore(automl): mock AutoMlClient in test_predicition_client_client_info by ohmayr · Pull Request #18068 · googleapis/google-cloud-python · GitHub

chore(automl): mock AutoMlClient in test_predicition_client_client_info - #18068

Merged
parthea merged 1 commit into
mainfrom
fix-automl-tables-client-mock
Aug 11, 2026
Merged

chore(automl): mock AutoMlClient in test_predicition_client_client_info#18068
parthea merged 1 commit into
mainfrom
fix-automl-tables-client-mock

Conversation

ohmayr commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Following #17616, google-api-core extracts and deduplicates the x-goog-api-client metrics header during callable construction in _GapicCallable.__init__ (_extract_metrics_header). Because AutoMlClient was not mocked in this test, passing client_info=mock.Mock() caused AutoMlClient's transport wrapper to attempt unpacking the mock metadata into (key, value) pairs, resulting in:

TypeError: cannot unpack non-iterable Mock object

ohmayr requested a review from a team as a code owner August 11, 2026 16:28

gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Code Review

This pull request updates the unit test test_prediction_client_client_info in test_tables_client_v1beta1.py to mock and pass a client argument when instantiating TablesClient. There are no review comments, and I have no feedback to provide.

parthea enabled auto-merge (squash) August 11, 2026 17:00
parthea merged commit ccc7498 into main Aug 11, 2026
52 checks passed
parthea deleted the fix-automl-tables-client-mock branch August 11, 2026 17:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL