feat: 维护中国代理池并支持账号自动均匀使用
This commit is contained in:
@@ -244,3 +244,15 @@ def test_proxy_off_scheme_clears_settings() -> None:
|
||||
assert account.proxy_scheme == ""
|
||||
assert account.proxy_host == ""
|
||||
assert account.proxy_port is None
|
||||
|
||||
|
||||
def test_proxy_pool_scheme_enables_auto() -> None:
|
||||
account = _ProxyAccount()
|
||||
apply_proxy(account, "pool")
|
||||
view = proxy_view(account)
|
||||
assert view["enabled"] is True
|
||||
assert view["scheme"] == "pool"
|
||||
assert account.use_proxy_pool is True
|
||||
apply_proxy(account, "http", "10.0.0.1", 8080)
|
||||
assert account.use_proxy_pool is False
|
||||
assert proxy_view(account)["scheme"] == "http"
|
||||
|
||||
Reference in New Issue
Block a user