MCPcopy
hub / github.com/scrapy/scrapy / mitm_proxy_server_https

Function mitm_proxy_server_https

conftest.py:90–99  ·  view source on GitHub ↗
(monkeypatch: pytest.MonkeyPatch)

Source from the content-addressed store, hash-verified

88
89@pytest.fixture # function scope because it modifies os.environ
90def mitm_proxy_server_https(monkeypatch: pytest.MonkeyPatch) -> Generator[MitmProxy]:
91 proxy = MitmProxy()
92 url = proxy.start().replace("http://", "https://")
93 monkeypatch.setenv("http_proxy", url)
94 monkeypatch.setenv("https_proxy", url)
95
96 try:
97 yield proxy
98 finally:
99 proxy.stop()
100
101
102@pytest.fixture(scope="session")

Callers

nothing calls this directly

Calls 4

startMethod · 0.95
stopMethod · 0.95
MitmProxyClass · 0.90
replaceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…