Tests fixed for python 3