MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / _test_echo

Function _test_echo

test/mitmproxy/proxy/layers/test_tls.py:144–155  ·  view source on GitHub ↗
(
    playbook: tutils.Playbook, tssl: SSLTest, conn: connection.Connection
)

Source from the content-addressed store, hash-verified

142
143
144def _test_echo(
145 playbook: tutils.Playbook, tssl: SSLTest, conn: connection.Connection
146) -> None:
147 tssl.obj.write(b"Hello World")
148 data = tutils.Placeholder(bytes)
149 assert (
150 playbook
151 >> events.DataReceived(conn, tssl.bio_read())
152 << commands.SendData(conn, data)
153 )
154 tssl.bio_write(data())
155 assert tssl.obj.read() == b"hello world"
156
157
158class TlsEchoLayer(tutils.EchoLayer):

Callers 3

test_simpleMethod · 0.70
test_client_onlyMethod · 0.70
test_server_requiredMethod · 0.70

Calls 5

dataFunction · 0.85
bio_readMethod · 0.80
bio_writeMethod · 0.80
writeMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…