@@ -109,29 +109,6 @@ def test_open_unix_connection_no_loop_ssl(self): |
|
|
109 |
109 |
|
110 |
110 |
self._basetest_open_connection_no_loop_ssl(conn_fut) |
111 |
111 |
|
112 |
|
-@unittest.skipIf(ssl is None, 'No ssl module') |
113 |
|
-def test_drain_on_closed_writer_ssl(self): |
114 |
|
- |
115 |
|
-async def inner(httpd): |
116 |
|
-reader, writer = await asyncio.open_connection( |
117 |
|
-*httpd.address, |
118 |
|
-ssl=test_utils.dummy_ssl_context()) |
119 |
|
- |
120 |
|
-messages = [] |
121 |
|
-self.loop.set_exception_handler(lambda loop, ctx: messages.append(ctx)) |
122 |
|
-writer.write(b'GET / HTTP/1.0\r\n\r\n') |
123 |
|
-data = await reader.read() |
124 |
|
-self.assertTrue(data.endswith(b'\r\n\r\nTest message')) |
125 |
|
- |
126 |
|
-writer.close() |
127 |
|
-with self.assertRaises(ConnectionResetError): |
128 |
|
-await writer.drain() |
129 |
|
- |
130 |
|
-self.assertEqual(messages, []) |
131 |
|
- |
132 |
|
-with test_utils.run_test_server(use_ssl=True) as httpd: |
133 |
|
-self.loop.run_until_complete(inner(httpd)) |
134 |
|
- |
135 |
112 |
def _basetest_open_connection_error(self, open_connection_fut): |
136 |
113 |
messages = [] |
137 |
114 |
self.loop.set_exception_handler(lambda loop, ctx: messages.append(ctx)) |