Fixed tests to work with Python3