Make test work with python3

I taught how to fix the last error.