Fixed tests for python 3