Commit ccc7498
authored
chore(automl): mock AutoMlClient in test_predicition_client_client_info (#18068)
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:
```text
TypeError: cannot unpack non-iterable Mock object1 parent bd979a6 commit ccc7498
1 file changed
Lines changed: 2 additions & 0 deletions
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1716 | 1716 | | |
1717 | 1717 | | |
1718 | 1718 | | |
| 1719 | + | |
1719 | 1720 | | |
1720 | 1721 | | |
1721 | 1722 | | |
1722 | 1723 | | |
1723 | 1724 | | |
1724 | 1725 | | |
| 1726 | + | |
1725 | 1727 | | |
1726 | 1728 | | |
1727 | 1729 | | |
| |||
0 commit comments