Fix unittests for python 3