Preparing a websocket from a low-level-server request fails #2024
Closed
Description
A request from a low-level server does not have the app attribute, but web.WebSocketResponse.prepare() takes the event loop from BaseRequest.app.loop.
File ".../aiohttp/web_ws.py", line 103, in _pre_start
self._loop = request.app.loop
AttributeError: 'BaseRequest' object has no attribute 'app'
I was able to fix this by assigning a mock app to the request, which has a single loop attribute.