File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
import ssl
2
2
from pathlib import Path
3
- from typing import Any , Dict , Optional
3
+ from typing import Any , Dict
4
4
5
5
import proxy
6
6
import pytest
17
17
18
18
19
19
class AccessLogPlugin (HttpProxyBasePlugin ):
20
- def on_access_log (self , context : Dict [str , Any ]) -> Optional [ Dict [ str , Any ]] :
20
+ def on_access_log (self , context : Dict [str , Any ]) -> None :
21
21
print (context )
22
- return super ().on_access_log (context )
23
22
24
23
25
24
@pytest .mark .network
26
25
def test_proxy_overrides_env (script : PipTestEnvironment ) -> None :
27
26
with proxy .Proxy (
28
27
port = 8899 ,
29
- ), proxy .Proxy (plugins = [AccessLogPlugin ], port = 8888 ):
30
- script .environ ["http_proxy" ] = "127:0.0.1:8888"
31
- script .environ ["https_proxy" ] = "127:0.0.1:8888"
28
+ num_acceptors = 1 ,
29
+ ), proxy .Proxy (plugins = [AccessLogPlugin ], port = 8888 , num_acceptors = 1 ):
30
+ script .environ ["http_proxy" ] = "127.0.0.1:8888"
31
+ script .environ ["https_proxy" ] = "127.0.0.1:8888"
32
32
result = script .pip (
33
33
"download" ,
34
34
"--proxy" ,
You can’t perform that action at this time.
0 commit comments