Skip to content

Commit 1a75eef

Browse files
test: Update coverage improvement test for tests/utils/test_proxy_rotation.py
1 parent daf6908 commit 1a75eef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/utils/test_proxy_rotation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def test_is_ipv4_address():
7272
assert is_ipv4_address("no-address") is False
7373

7474

75-
def test_parse_or_search_proxy_success():
75+
def test_parse_or_search_proxy_success(monkeypatch):
7676
proxy = {
7777
"server": "192.168.1.1:8080",
7878
"username": "username",
@@ -91,6 +91,7 @@ def test_parse_or_search_proxy_success():
9191
"timeout": 10.0,
9292
},
9393
}
94+
monkeypatch.setattr("scrapegraphai.utils.proxy_rotation._search_proxy", lambda proxy: {"server": "dummy_proxy:8080"})
9495

9596
found_proxy = parse_or_search_proxy(proxy_broker)
9697

0 commit comments

Comments
 (0)