(addr)
| 321 | self.on_eof.set_result(True) |
| 322 | |
| 323 | async def client(addr): |
| 324 | await asyncio.sleep(0.5) |
| 325 | |
| 326 | on_data = self.loop.create_future() |
| 327 | on_eof = self.loop.create_future() |
| 328 | |
| 329 | tr, proto = await self.loop.create_connection( |
| 330 | lambda: ClientProto(on_data, on_eof), *addr) |
| 331 | |
| 332 | tr.write(HELLO_MSG) |
| 333 | new_tr = await self.loop.start_tls(tr, proto, client_context) |
| 334 | |
| 335 | self.assertEqual(await on_data, b'O') |
| 336 | new_tr.write(HELLO_MSG) |
| 337 | await on_eof |
| 338 | |
| 339 | new_tr.close() |
| 340 | |
| 341 | with self.tcp_server(serve, timeout=self.TIMEOUT) as srv: |
| 342 | self.loop.run_until_complete( |
nothing calls this directly
no test coverage detected