Commit 110eb7d
committed
fix(tests): Use spec for page mocks in test_get_ad_group_bid_modifiers.py
Updated `test_get_ad_group_bid_modifiers.py` to use the `spec`
argument when creating `MagicMock` instances for
`SearchGoogleAdsResponse` equivalents (named
`mock_search_response_page` in the test). The spec is `['results']`.
This change, in conjunction with using `MockGoogleAdsRow` for rows
and `MockAdGroupBidModifierModel` for bid modifier objects, aims to
ensure that the `results` attribute of the page mock returns the exact
list of assigned `MockGoogleAdsRow` instances. This should preserve
the custom types throughout the mock chain and resolve the persistent
`AttributeError: type object 'MagicMock' has no attribute 'pb'`.1 parent 2649f13 commit 110eb7d
File tree
1 file changed
+2
-2
lines changed- examples/advanced_operations/tests
1 file changed
+2
-2
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| |||
0 commit comments