(
playbook: tutils.Playbook, tssl: SSLTest, conn: connection.Connection
)
| 142 | |
| 143 | |
| 144 | def _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 | |
| 158 | class TlsEchoLayer(tutils.EchoLayer): |