Fix for Python3 in unittests