I'm working on a project that works with tornado's websocket functionality. I see a decent amount of documentation for working with asychronous code, but nothing on how this can be used to create unit tests that work with their WebSocket implementation.
I've attempted to implement some unit tests on
tornado.websocket.WebSocketHandler based handlers and got the following results:
First of all
AsyncHTTPTestCase definitely has lack of web sockets support.
Still, one can use it at least to manage
IOLoop and application stuff which is significant. Unfortunately, there is no WebSocket client provided with tornado, so here enter side-developed library.