Fixed tests running under python3