Fix tests
Now compatible with Python 3