fix unit tests with python 3