(proto, on_con, on_con_lost, on_got_hello)
| 615 | self.on_con_lost.set_exception(exc) |
| 616 | |
| 617 | async def main(proto, on_con, on_con_lost, on_got_hello): |
| 618 | tr = await on_con |
| 619 | tr.write(HELLO_MSG) |
| 620 | |
| 621 | self.assertEqual(proto.data, b'') |
| 622 | |
| 623 | new_tr = await self.loop.start_tls( |
| 624 | tr, proto, server_context, |
| 625 | server_side=True, |
| 626 | ssl_handshake_timeout=self.TIMEOUT) |
| 627 | proto.replace_transport(new_tr) |
| 628 | |
| 629 | await on_got_hello |
| 630 | new_tr.write(ANSWER) |
| 631 | |
| 632 | await on_con_lost |
| 633 | self.assertEqual(proto.data, HELLO_MSG) |
| 634 | new_tr.close() |
| 635 | |
| 636 | async def run_main(): |
| 637 | on_con = self.loop.create_future() |
no test coverage detected