mopemope/meinheld — pull request #46 by ricardo-kagawa (2014-10-01 05:19:03+00:00)
Title: Autobahn tests

Hi, I have incorporated the Autobahn's Test Suite for WebSockets into the project. Unfortunately it does not follow `py.test`'s conventions, nor does it support Python 3 as of yet. So I have defined a new `tox` environment which will run a Python 3 script which will install a Python 2 instance into the current `virtualenv` if not already available, then install and run the test client using that Python 2 instance.

A simple echo WebSocket server implemented with the current `WebSocketMiddleware` is used as the test server. Two servers, one for Python 3.4 and another for Python 2.7 are spawned in their own subprocesses to receive requests from the test client. The test generates JSON and HTML files under the folder (already `.gitignore`'d) specified in `fuzzingclient.json`, which are checked to see if the tests have passed.

Note that since the middleware fails in too many tests, only the first passing test is enabled, while all the others are currently skipped. Specifying an empty test set makes the test client hang for some reason, so at least this one is specified to avoid that.