Fix tests on python3