(*, debug=False, ssl_ctx=None, proto='http')
| 182 | |
| 183 | @asyncio.coroutine |
| 184 | def create(*, debug=False, ssl_ctx=None, proto='http'): |
| 185 | nonlocal app, handler, srv |
| 186 | app = web.Application(loop=loop) |
| 187 | port = unused_port() |
| 188 | handler = app.make_handler(debug=debug, keep_alive_on=False) |
| 189 | srv = yield from loop.create_server(handler, '127.0.0.1', port, |
| 190 | ssl=ssl_ctx) |
| 191 | if ssl_ctx: |
| 192 | proto += 's' |
| 193 | url = "{}://127.0.0.1:{}".format(proto, port) |
| 194 | return app, url |
| 195 | |
| 196 | yield create |
| 197 |
nothing calls this directly
no test coverage detected