tests: deterministic proxy-fault fixture
ci / static (push) Successful in 23s
ci / test-3.13 (push) Successful in 42s
ci / test-3.12 (push) Successful in 1m39s
ci / image (push) Failing after 6s
ci / smoke (push) Skipped
ci / publish (push) Skipped

This commit is contained in:
omar committed 2026-11-28 20:43:40 +03:00
1 parent 8e246a149d
commit eea7150993
1 file changed
+4 -2
+4 -2
View File
@@ -31,8 +31,10 @@ def test_no_direct_fallback_when_pool_is_empty(pool, site):
assert caught.value.code == "proxy_unavailable"
def test_dead_proxy_cools_and_next_serves(site, proxies, pool, dead):
made = pool(dead.url(), proxies["http"].url())
def test_rejecting_proxy_cools_and_next_serves(site, proxies, pool):
"""A 407 is a proxy fault: cool that exit and answer from the next one."""
bad = f"http://user:wrong@127.0.0.1:{proxies['creds'].port}"
made = pool(bad, proxies["http"].url())
assert transport.download(site.url(), allow_private=True).body == b"OK"
assert made.snapshot()[0]["available"] is False