converted to python 3. Added some websockets test code