Fix tests in python3