Patched from
https://github.com/liris/websocket-client/pull/74#issuecomment-40325859

Fixes python3 unittests, python2 unittests aren't quite working yet
though

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>