File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,26 @@ def test_proxy_manager_invalid_credentials_format(proxy_options):
6666 ]
6767
6868
69+ def test_proxy_manager_with_scheme_http (proxy_options ):
70+ proxy_options .
add_argument (
'--proxy-server=http://user:[email protected] :8080' )
71+ manager = ProxyManager (proxy_options )
72+ result = manager .get_proxy_credentials ()
73+
74+ assert result [0 ] is True
75+ assert result [1 ] == ('user' , 'pass' )
76+ assert proxy_options .arguments == ['--proxy-server=http://proxy.local:8080' ]
77+
78+
79+ def test_proxy_manager_with_scheme_socks (proxy_options ):
80+ proxy_options .
add_argument (
'--proxy-server=socks5://alice:[email protected] :1080' )
81+ manager = ProxyManager (proxy_options )
82+ result = manager .get_proxy_credentials ()
83+
84+ assert result [0 ] is True
85+ assert result [1 ] == ('alice' , 'pwd' )
86+ assert proxy_options .arguments == ['--proxy-server=socks5://1.2.3.4:1080' ]
87+
88+
6989def test_proxy_manager_invalid_proxy_format (proxy_options ):
7090 proxy_options .add_argument ('--proxy-server=invalidformat' )
7191 manager = ProxyManager (proxy_options )
You can’t perform that action at this time.
0 commit comments