Fixed tests to run on Python 3