Upgrade generated test code and fix python3 tests.

@tmehlinger Thank you so much for refactoring tests for us, here are my fix for python3 (see https://github.com/eleme/gunicorn_thrift/pull/9 for tests result). If tests at our repo pass after you merge this, I'll merge your pr there.

Thanks again for providing python3 support :)