Skip to content

Commit 859ad7c

Browse files
committed
Test proxy
1 parent 19f7535 commit 859ad7c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/functional/test_proxy.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import ssl
22
from pathlib import Path
3-
from typing import Any, Dict, Optional
3+
from typing import Any, Dict
44

55
import proxy
66
import pytest
@@ -17,18 +17,18 @@
1717

1818

1919
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:
2121
print(context)
22-
return super().on_access_log(context)
2322

2423

2524
@pytest.mark.network
2625
def test_proxy_overrides_env(script: PipTestEnvironment) -> None:
2726
with proxy.Proxy(
2827
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"
3232
result = script.pip(
3333
"download",
3434
"--proxy",

0 commit comments

Comments
 (0)