MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_warn_no_nextlayer

Function test_warn_no_nextlayer

test/mitmproxy/addons/test_proxyserver.py:189–199  ·  view source on GitHub ↗

Test that we log an error if the proxy server is started without NextLayer addon. That is a mean trap to fall into when writing end-to-end tests.

(caplog)

Source from the content-addressed store, hash-verified

187
188
189async def test_warn_no_nextlayer(caplog):
190 """
191 Test that we log an error if the proxy server is started without NextLayer addon.
192 That is a mean trap to fall into when writing end-to-end tests.
193 """
194 ps = Proxyserver()
195 with taddons.context(ps) as tctx:
196 tctx.configure(ps, listen_host="127.0.0.1", listen_port=0, server=False)
197 assert await ps.setup_servers()
198 ps.running()
199 assert "Warning: Running proxyserver without nextlayer addon!" in caplog.text
200
201
202async def test_self_connect():

Callers

nothing calls this directly

Calls 5

setup_serversMethod · 0.95
runningMethod · 0.95
ProxyserverClass · 0.90
contextMethod · 0.80
configureMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…