MCPcopy
hub / github.com/aio-libs/aiohttp / test_handle_request_io

Method test_handle_request_io

tests/test_wsgi.py:198–212  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

196 self.assertFalse(srv._keep_alive)
197
198 def test_handle_request_io(self):
199
200 def wsgi_app(env, start):
201 start('200 OK', [('Content-Type', 'text/plain')])
202 return io.BytesIO(b'data')
203
204 srv = self._make_srv(wsgi_app)
205
206 self.loop.run_until_complete(
207 srv.handle_request(self.message, self.payload))
208
209 content = b''.join(
210 [c[1][0] for c in self.writer.write.mock_calls])
211 self.assertTrue(content.startswith(b'HTTP/1.0 200 OK'))
212 self.assertTrue(content.endswith(b'data'))
213
214 def test_handle_request_keep_alive(self):
215

Callers

nothing calls this directly

Calls 2

_make_srvMethod · 0.95
handle_requestMethod · 0.45

Tested by

no test coverage detected