Skip to content

Commit a032270

Browse files
authored
Stub url requests in upload image asset example test. (#1034)
1 parent 90e73a6 commit a032270

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/examples/misc/upload_image_asset_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ def test_main_success(self, mock_get_image_bytes_in_success, mock_print_in_succe
9696

9797
@mock.patch("sys.exit")
9898
@mock.patch("builtins.print")
99-
def test_main_google_ads_exception(self, mock_print_for_exception, mock_sys_exit_for_exception): # Renamed for clarity
99+
@mock.patch("examples.misc.upload_image_asset.get_image_bytes_from_url")
100+
def test_main_google_ads_exception(self, mock_print_for_exception, mock_sys_exit_for_exception, bytes_from_url_mock): # Renamed for clarity
100101
"""Tests handling of GoogleAdsException."""
101102
customer_id = "1234567890"
102103

0 commit comments

Comments
 (0)