Fixed tests to run in Python 3