Fix unittests in python 3